5 Replies Latest reply on Dec 8, 2006 2:23 PM by BKBK

    Error with CFFILE

    jgiblin
      I am getting the following error when I upload a file that is 8 megs using cfile:

      The request has exceeded the allowable time limit Tag: cffile

      I was able to upload the same file with asp and asp.net with no problems. It seemed like it was hanging in CF for a couple minutes. The funny things is, it does not happen in our lab enviroments and it only takes a few seconds to upload.

      Any suggestions.

      John

        • 1. Re: Error with CFFILE
          BKBK Adobe Community Professional & MVP
          If you have access to the Coldfusion Administrator, it might help to increase the timeout value in the Settings.

          • 2. Re: Error with CFFILE
            Gibby1
            I would. But it takes an extremely long time for the request and I think it is being block some other way. When I do the same request with the same file and our lab server it only takes a few seconds. When I do the same request in asp and asp.net on that server it only takes a few seconds too. It seems like something is block the file from being upload

            John
            • 3. Re: Error with CFFILE
              BKBK Adobe Community Professional & MVP
              Could we see the code?

              • 4. Error with CFFILE
                Gibby1 Level 1

                Below is the Snippet of code.

                It never makes it past this first line. It almost seems like something on IIS5. I creates the file,but stops at 1048 kb. But this is weird, when the error message appears, the file becomes 7.8m. The entire file is 8megs

                <CFFILE ACTION="Upload"
                FILEFIELD=#Attributes.SourceField# DESTINATION="#TargetFile#.tmp"
                NAMECONFLICT="MAKEUNIQUE" ATTRIBUTES="Temporary">
                <CFSET FileName = CFFile.ClientFile>
                <CFSET FileSize = CFFile.FileSize>

                <!--- DETERMINE MIME TYPE --->
                <CF_MIME EXTENSION=#File.ClientFileExt# TYPE=#File.ContentType# SUBTYPE=#File.ContentSubType#>

                <!--- MOVE IT TO CORRECT LOCATION (REPLACING OLD VERSION, IF NECESSARY) --->
                <CFFILE ACTION="Rename" SOURCE="#TargetFile#.tmp" DESTINATION="#TargetFile#" ATTRIBUTES="Normal">
                • 5. Error with CFFILE
                  BKBK Adobe Community Professional & MVP
                  You must state, that is, hard-code, the name of the form field used to select the upload file. #Attributes.SourceField# is no good, as you may not use pound(#) signs.

                  The Destination attribute should be the path to a directory. You seem to use the path to a file in the upload-action. Also, is there an attributes option called "temporary"? I'm aware of just "readOnly", "hidden" and "normal".