Admin interface should provide option for allowing the admin to specify the location of the file using a relative path. Currently it only allows the admin to upload a file.
|admin file FileField upload path
|Design decision needed
|Patch needs improvement:
Here's the scenario I'm suffering from.
My model has a FileField. Basically, I need to create new instances from time to time. Each instance has two files - one about 15 MB and the other about 25 MB.
In the Admin interface, when I try to create a new interface, it wants me to upload the files. If I try that, I get a 500 Error - most likely the process is running out of memory (using FastCGI with Apache).
Now the database does not hold the whole file - only the relative path to it. If I could manually upload the file (FTP, etc), and simply supply the path in the Admin interface, my life would be made easier. As it stands, I have to manually edit the paths in MySQL. So it would be nice if the Admin interface provided both options: Uploading and specifying local paths.
Of course, this solution is not ideal (although it does make handling files more flexible). I'm told the reason I have this problem is that Django tries to keep the whole file in memory before it dumps it to disk. I don't know if there's a ticket open for it, but it would make more sense if Django would write to disk as it reads the file from the upload process. (I'll gladly accept any corrections to my reasoning - I'm Django newbie).