I have a problem downloading files. I am using FastCGI on Apache2 (unix) to run a WSGI-compatible application. Downloading files as images begins with saving to a MySQL database. However, large images are truncated at 65,535 bytes. As far as I can tell, nothing should limit the size of the files, and I'm not sure which part of my solution will cause the problem.
This is FastCGI; can it limit the file upload size?
Is this Python? The object cgi.FieldStoragegives me descriptor file downloaded file, which I then read: file.read(). Does the file size limit in any way?
Is it MySQL? Column type for storing image data longblob. I decided that this could store a couple of data in the amount of GB. So a few MB should not be a problem, right?
Is it flups WSGIServer? I can not find any information about this.
My file system can handle huge files, so this is not a problem. Any ideas?
UPDATE:
This is MySQL. I got python to display the number of bytes downloaded and more than 65535. So I looked max_allowed_packetfor mysqldand set it to 128M. Overkill, but I want to be sure at the moment.
My only problem now is getting python MySQLdbto allow transfer of more than 65535 bytes. Does anyone know how to do this? You can write a separate question.