I have a Django app running on a server. Currently user uploads are stored on the server filesystem.
I already know how to set up S3 storage. What is the best way to migrate existing uploads to S3 without breaking the API and having existing uploads still available?
These files are served to the front end in two ways:
/media/path/to/upload
endpoint:/media/<path> django.views.static.serve
/api/v1/users/<user_pk>/items/<item_pk>/attachments/<pk>/ project.app.views.ItemAttachmentsViewSet
Does the following make sense:
/media/path
go to a new view that will serve the files similar to how ItemAttachmentsViewSet
does it.
? Or is there a better way?The procedure outlined in the question was what I ended up doing, with the exception of step 4 which turned out to be unnecessary.