I am building a site that requires the user to upload images that will be around 70MB each to my server. Currently I am running a Linode with 512MB of RAM. There isn’t much extra memory to spare due to other sites being on this server, so is it possible to upload those images to the server without taking up any RAM by dumping the image directly to the filesystem, or does any file uploaded via POST have to be loaded into memory first before it can be dumped to the filesystem? Does the nature of this problem require a server with a lot of RAM?
Would there be a way to somehow integrate an ftp client into an html form? I’m using Django if that makes a difference.
In your project settings, set FILE_UPLOAD_MAX_MEMORY_SIZE to something small (eg 1024 bytes). That will make Django spool request.FILES to disk sooner, not use up RAM
Docs are here if you want more detail: https://docs.djangoproject.com/en/dev/ref/settings/#file-upload-max-memory-size