0

I currently have my files saved in my own server using FileField. And I want to make a migration for saving my files in S3. I was thinking in replace the FileField to a CharField keeping the file names and then, add the domain before it, to keep the track of the files. And then I'd migrate to S3.

Is there a simpler way to make this in Django? Is it even possible to change a FileField to a CharField and keep the files path as a string?

Jimmy A. León
  • 541
  • 3
  • 6
  • 22

1 Answers1

1

Hey I was succesful in leaving the FileFields as is and using django-storages. Then using the storage injected into the file field to make it use s3. I did not have to migrate the database for this. https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html

Phteven
  • 400
  • 2
  • 7