2

We are running ColdFusion 8 in IE-10 on Windows Server 2003 with IIS 6.0 and using HTTPS.

The Test.cfm page has this basic code for creating a "browse" button to select a file to upload and then uploading the file:

<CFIF IsDefined("form.Action")>
        <CFFILE ACTION="UPLOAD"
            DESTINATION="D:\Documents\123\"
                  NAMECONFLICT="OVERWRITE"
                  FILEFIELD="Filedata">
    <b>File uploaded.</b> 
<CFSET PathName = "#File.ClientFileName#.#File.ClientFileExt#">
<CFOUTPUT>
    <CFQUERY NAME="Attachments" DATASOURCE="#PriSource#" USERNAME="Test" PASSWORD="Account">
        INSERT INTO V$ATTACH_DOCs
            (ID, DOCNAME, DOCLOCATION)
        VALUES (123, 'Attach1', '#PathName#')
    </CFQUERY>

</CFIF>

<FORM NAME="FileUpLoadNew" id="FileUpLoadNew" action="../TEST/Test.cfm" enctype="multipart/form-data" method="post">
<input type="Hidden" name="Action" value="Upload">
<INPUT TYPE="File" name="Filedata" size="45" maxlength="255">   
<INPUT TYPE="Submit"  NAME="AttachButton"  WIDTH="90" VALUE="Attach">
</FORM>

The problem: This code works almost all the time with file types like (.txt, .doc, .cfm. .sql). It even does large files at least 5-10 Mb. But .pdf, jpg, and large .doc files (4Mb) will cause it to hang, "Waiting for response from Our.Site.URL...", until it finally says "Page cannot be displayed".

However, we can sometimes just reload the page and select the same file and it will upload fine! And then we can retry another file and it may or may not load. We have also seen "HTTP error 413 Request Entity too large" when the file is small, like 300Kb, typically with a pdf file.

We initially thought it was the setting for UploadReadAheadSize on the server. We increased it with no effect.

We've also tested using only <INPUT TYPE="File" ...> and <INPUT TYPE="Submit" ...> and not even calling CFFILE, and we can see the same issue where certain file types are not accepted and the browse field does not clear and it says "Waiting for response...". We thought CFFILE was the problem, but this test indicates it must be in IE or the server. We also tried using FireFox and got the same inconsistent results.

Seems like the server is having issues with pdf, jpg, and larger files, but not all the time. Reloading the page will sometimes allow the file to load. But it's not consistent. I do not have access to the server to change settings, but I can submit requests to have them changed. We just need a consistent behavior for users to upload files.

  • I believe the answer you're looking for is here; this has a good explanation of the settings you're looking for: http://serverfault.com/questions/582225/coldfusion-settings-for-large-file-uploads – FlipperPA May 25 '15 at 14:25

1 Answers1

0

This issue appears to be resolved. We had increased the size of UploadReadAheadSize on the server to 200KB, which had no effect. So someone suggested trying 20Mb, which far exceeds the size of any document we would need to attach. But now all files are working with the upload code with no failures. We've tested it with different size files up to 10MB and different file types and by different users. The response is now consistent.