I have a model like this:
class Person(models.Model):
name = models.Charfield(max_length¶=30)
photo = models.FileField(upload_to='uploads/')
Is there any way to dynamically change the Storage class of photo field based on the value of the name field?
for example, I want to store the photo of the persons with the name xxx to FileSystemStorage¶ and for the others I want to use S3Storage