Does CFFILE have a file size limit?
There is no specific limit on file size for CFFILE. However, CFFILE loads the file into the server's memory, so you will get an error if the file size exceeds the amount of free RAM.
Also note, you can place a server wide limit on the size of uploads in the CF administrator. Under the "settings" link, see: Maximum size of post data (MB), Request throttle threshold (MB), and Request throttle memory (MB).
This question was written by Jacob Munson.
It was last updated on July 13, 2006 at 4:36:25 PM EDT.
Categories
Comments
Comment made by O?uz Demirkap? on July 13, 2006 at 4:13 PM
The main problem that I got with CFFile is timeout issues. Specially for upload processes. Sometimes we prefer some COM objects to upload files and see realtime status of upload process.
If you have any chance to use Perl for file processing on your server, you will really like it! It rocks! CF is too week for these kind of jobs.
Comment made by Steven Erat on July 13, 2006 at 7:24 PM
Not only do file uploads use server memory, they use about 2x-3x the file size in memory in CF 4/5/6/7. You can do the test yourself to see.
Regarding timeouts, perhaps you could use an asynch gateway for that?
Comment made by charlie arehart on July 13, 2006 at 8:26 PM
I'm surprised to hear this assertion that doing file uploads use server memory. You guys don't mean ColdFusion's memory, do you? My observation over the years is that the file upload is purely between the browser and the server, which uploads the file to a temp location on the server, and then the REAL work of CFFILE Action="upload" is merely to move the file from that to the named DESTINATION. Steven, do you have internals information to suggest otherwise?
Comment made by charlie arehart on July 13, 2006 at 8:27 PM
I meant to say, "My observation over the years is that the file upload is purely between the browser and the *web* server, ..."
Again, my point is that then I'd be surprised that any CF server memory would be used at all in either that or the move process.
Comment made by Kris Brixon on July 21, 2006 at 7:34 PM
Try these CFCs for large files: http://www.informationsavvy.com/coldfusion/
Comment made by Gus on August 9, 2006 at 10:57 AM
Charlie, you are basically correct. However I believe the issue referred to here is related to "action=read" not "action=upload"
Comment made by charlie arehart on March 8, 2007 at 10:06 PM
Gus, I'm surprised to hear you say that. Both the entry and the first two comments (those just before mine) specifically mention uploading. HAd either either mentioned "reading" a file, I certainly wouldn't have denied that THAT takes up CF server memory.