Solved

CFFILE UPLOAD - Files being truncated

Posted on 2004-04-28
8
375 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
 

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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

12 Experts available now in Live!

Get 1:1 Help Now