Audio and video uploads over 2 megabyte do not upload / tmp not working

Audio and video uploads over 2 megabyte do not upload. I can upload smaller files, but bigger files do not work. The support at my host ( suggested to do the following:

Thanks for the info. In this case, the temp directory is missing.

Check the FILE_UPLOAD_TEMP_DIR in the file and make sure this temp directory exists.

By default you only need to enter:

mkdir ~/projectname/dproject/tmp

(Replace projectname with your project name directory).

Django writes files during the upload process in this directory, which are bigger than 2.5 MB to avoid high RAM usage.

I have added FILE_UPLOAD_TEMP_DIR = ‘/tmp/’ to and added a tmp/ folder to the dproject folder, but the uploads still do not work.

How can I get uploads to work properly?

I don’t know your host, but I have a vague memory of 2meg being a file-upload limit in my web-server’s stock configuration – there may be a couple of related settings, too… Maybe it’s something of that sort on your host, not specific to Django?

The host replied with:

In the file username/web/project/ I changed the config to:

FILE_UPLOAD_TEMP_DIR = os.path.join(BASE_DIR, ‘…’, ‘tmp’)

And to activate the changes I restarted gunicorn:

~/init/username restart

(username inserted to obscure real project name by me)

But the uploads still do not work.

Did the host understand that uploads DO work, right up until the size exceeds 2meg? It seems a bit surprising that the upload directory would be the fix for that. (It could be of course, but just feels like maybe they’ve missed what the problem really is.)

As mentioned before though, I don’t know enough about the situation, so this is just my best guess from afar!