Django >= 3.2 does not allow absolute file paths for FileFields. Is there no way to disable this?
There are some scenarios where you might want to do this. For example, in our tests, we have to create objects with files, and we’d rather write these files to /tmp. In some use cases, e.g. chunked uploads, we create files which we end up deleting, and we may not necessarily want to store them in the /media/ directory. Finally, we are using a network file system mounted at e.g. /mnt/efs and might use that as a place to store files. These seem like reasonable use cases where the file paths need to be absolute, but now we get the
SuspiciousFileOperation and I can’t seem to turn it off or ignore these.
Maybe I’m doing something blatantly wrong so any assistance with this would be much appreciated.