I have a new app that involves uploading images. I have tried all sorts of different combinations in fly.toml and my settings.py, but nothing has worked yet. Let’s pretend my app is named ‘fubar’. Here is what I am doing right now before my flyctl deploy:
There seem to be discrepancies between V1 and V2 with regard to the path. I am not altogether sure whether the [mounts] destination should be "/data", "/app/data", or "/fubar/data".
Perhaps my MEDIA_ROOT should simply be '/data/media' and should exclude the BASE_DIR?
Update: Thanks - Yes, I been setting the destination to the root, "/data", and my uploads are working and they persist. At this point my issue is Django itself, which is refusing to serve local media files. If I find a solution I will post it here.
I am stuck on this same issue. I have successfully deployed my django project with DEBUG = False, and although static is being served successfully from a volume located at /data, the same cannot be said for media.
When media is added to a model via the Admin portal, I can see that the file is being added to the storage volume, but when I then go to a template which tries to render this media (e.g. a user profile photo), all I get is a broken image icon. Can somebody please tell me how to serve media from a fly volume?