8 Replies Latest reply on Apr 10, 2007 6:29 AM by Kling

    File upload doesn't work and no error!  What's going on?

    Grant Level 1


      We are migrating our intranet from ColdFusion 5 on Solaris to ColdFusion MX 7 on Linux and I'm testing out the existing applications on the new server. The processing page for a file upload is using CFFILE with ACTION="upload". The page finishes processing fine, no error, and continues as if it was successful but the file never actually gets to the destination directory. I tried with larger files and it did take longer (so the file appeared to get transmitted), but it still does not get saved to the server's file system. This all works fine on the current system running CF5. I've tried the CFFILE destination with and without a slash at the end - no difference. We have ColdFusion 7.0.1 installed. Hot fix 2 has been applied but that did not fix the problem.

      Any ideas?
        • 1. Re: File upload doesn't work and no error!  What's going on?
          Level 7
          Can you see if the file is getting to the webserver's (not ColdFusion)
          temp file directory?

          When a file is uploaded from the browser the webserver(IIS|Apache|etc)
          upload it to a temp location, then all CFFile does is copy the file
          from the temp directory to where ever specified.

          So you can see if the problem is failing before or after this point.

          Grant wrote:
          >
          >
          > We are migrating our intranet from ColdFusion 5 on Solaris to ColdFusion MX 7
          > on Linux and I'm testing out the existing applications on the new server. The
          > processing page for a file upload is using CFFILE with ACTION="upload". The
          > page finishes processing fine, no error, and continues as if it was successful
          > but the file never actually gets to the destination directory. I tried with
          > larger files and it did take longer (so the file appeared to get transmitted),
          > but it still does not get saved to the server's file system. This all works
          > fine on the current system running CF5. I've tried the CFFILE destination with
          > and without a slash at the end - no difference. We have ColdFusion 7.0.1
          > installed. Hot fix 2 has been applied but that did not fix the problem.
          >
          > Any ideas?
          >
          • 2. Re: File upload doesn't work and no error!  What's going on?
            Grant Level 1
            I figured out that the permissions on the directory where the file was supposed to be put were not set correctly (they had to be owned by Apache), but that brings up 2 more questions:

            1. Why did I not get an error if ColdFusion could not write the file to the directory? It wasn't logged either.
            2. Why are the spaces in filenames that are uploaded with CFFILE not being replaced with underscores like they were in CF5? It still seems to be working, but I'm confused as to why this feature would change.

            Thanks.
            • 3. Re: File upload doesn't work and no error!  What's going   on?
              Level 7
              Grant wrote:
              > I figured out that the permissions on the directory where the file was supposed
              > to be put were not set correctly (they had to be owned by Apache), but that
              > brings up 2 more questions:
              >
              > 1. Why did I not get an error if ColdFusion could not write the file to the
              > directory? It wasn't logged either.

              Is there a chance the error was somehow trapped or suppressed?

              > 2. Why are the spaces in filenames that are uploaded with CFFILE not being
              > replaced with underscores like they were in CF5? It still seems to be working,
              > but I'm confused as to why this feature would change.

              I didn't know CF5 did this? I did not use 5 for very long. Pretty much
              went from 4.5 to 6.0 several years ago, now on 7.01|2.
              • 4. Re: File upload doesn't work and no error!  What's going   on?
                Grant Level 1
                >> 1. Why did I not get an error if ColdFusion could not write the file to the
                >> directory? It wasn't logged either.
                >
                >Is there a chance the error was somehow trapped or suppressed?

                I did not put any code in (like CFTRY) that could have caught it. Is there something else that may have suppressed an error that I'm not thinking of?

                >> 2. Why are the spaces in filenames that are uploaded with CFFILE not being
                >> replaced with underscores like they were in CF5? It still seems to be working,
                >> but I'm confused as to why this feature would change.
                >
                >I didn't know CF5 did this? I did not use 5 for very long. Pretty much
                >went from 4.5 to 6.0 several years ago, now on 7.01|2.

                Have you ever run into problems reading, editing or deleting files on a Linux system that had spaces in the filenames?
                • 5. Re: File upload doesn't work and no error!  What's going on?
                  Kling Level 1
                  I'm having a similar problem... We upgraded from CF 5 to 7... and if you upload a really small file, it works fine, but if you upload something over 300 K, it just goes to a blank page... and it doesn't even get to the cffile.. I put something like Done followed by a cfabort before the cffile and I don't even see that. Is there a new setting for max upload? In CF Administrator we have "Maximum size of post data" set to 500 MB so that shouldn't be a problem.... we also upgraded to IIS 6 and Windows 2003
                  • 6. Re: File upload doesn't work and no error!  What's going on?
                    Kling Level 1
                    I found the solution:
                    http://www.adobe.com/go/8d933f86

                    I had to replace my forms and inputs with cfforms and cfinputs
                    • 7. Re: File upload doesn't work and no error!  What's going on?
                      Schuchert
                      I have tried this but that solution does not work for me. Did it work for you?
                      • 8. Re: File upload doesn't work and no error!  What's going on?
                        Kling Level 1
                        We also had to have users who tried to upload since we went to MX7 clear their cache (Tools -> Internet Options ->Delete Cookies & Delete Cookies) and then it worked. Luckily we only have 800 users and only a few dozen tried to upload something big in that week.