Solved

CFFILE UPLOAD - Files being truncated

Posted on 2004-04-28
8
394 Views
Last Modified: 2013-12-24
I am using CF MX on Linux and I am having a problem.  When I use CFFILE to upload large files to the server (5mb) it looks as if it works fine, but the files are truncated at just over 2mb.  There is no consistancy to the file size each time, but it always seems to be just over 2mb.  Smaller files work with no problem.

Any ideas on this one?  Thanks!
0
Comment
Question by:claydough
  • 4
  • 3
8 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 10941359
Not really sure, but...

Since the file is submitted by a form I wonder if it has to do with how large the form data is.  SO in cases where there is more form data then you would get a slightly smaller size and vice versa.

If this is the problem then in any case you would eventually hit the form limit.

I would recommend that if you have a need to work with files this large then you look at using cfftp and set up some ftp interface instead of submitting them in the form scope.
0
 
LVL 11

Expert Comment

by:phileoca
ID: 10941360
does your server have a file size limit?  (some do)
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10941434
Chances are that if there was a filesize limit then all the files would have been truncated at the same size - which is not what is happening...
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:claydough
ID: 10941437
I was just doing some more testing and took the really simple example from the O'Reilly Programming ColdFusion book (example 12-2,12-3).  It is just 1 form field (the file) and a results page.  About 30% of the time the file makes it up completed, but the other 70% is is anywhere between 2-3 megs.  Here is the result:

CFFILE Upload Results:
AttemptedServerFile POTATOE_BUG1.wmv
FileWasAppended NO
ClientDirectory C:\Documents and Settings\cjohnston\Desktop\POTATOE_BUG1.wmv
FileWasOverwritten YES
ClientFile POTATOE_BUG1.wmv
FileWasRenamed NO
ClientFileExt wmv
FileWasSaved NO
ClientFileName POTATOE_BUG1
OldFileSize 3522560
ContentSubType x-ms-wmv
ServerDirectory /usr/local/oasis/tools/contentattachments
ContentType video
ServerFile POTATOE_BUG1.wmv
DateLastAccessed {d '2004-04-28'}
ServerFileExt wmv
FileExisted YES
ServerFileName POTATOE_BUG1
FileSize 3522560
TimeCreated {ts '2004-04-28 12:08:24'}

0
 

Author Comment

by:claydough
ID: 10941444
the filesize in the above example should be 5062794
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10941480
hmmm... so sometimes it makes it up correctly?

So it isn't always truncated at just over 2 megs, just most of the time...

Is there a different result based on whether or not the file was alredy on the server or not?

0
 

Author Comment

by:claydough
ID: 10941608
No, the result is the same.  I just had a chat with one of the developers of our content management system (we do web sites for TV stations around the US).  When he developed his video upload piece he used cfftp.  He allowed the person to click on an FTP link that popped up a window of an FTP directory that acts as a drop box of sorts....the user drags the video in...goes back to the parent window, reloads with a click and a cfdirectory shows a listing of the files in the drop box.  They select the file they want to use and it moves it to the correct location.  

Sounds like a huge pain for the user, but for large files, I'm not sure there is another solution.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10941710
Yeah that is what I was recommending in my first post.  At least with cfftp it is not too hard to set up - it just ins't as pretty as being able to use cffile.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now