3 Replies Latest reply on Oct 12, 2010 11:42 AM by Adam Cameron.

    Cffile upload not working...no errors either

    smd71

      Hi,

       

      I've created an upload form that returns NO for the fileWasSaved attribute. However, I cannot figure out the issue. I'm starting to think that CF wasn't set up to handle file uploads during the initial installation, but how do I know for sure?

       

      smd71

        • 1. Re: Cffile upload not working...no errors either
          Dave Watts Adobe Community Professional

          There's nothing specific in the setup of CF for file uploads. Does CF have permission to write to the directory in question?

           

          Dave Watts, CTO, Fig Leaf Software

          http://www.figleaf.com/

          http://training.figleaf.com/

           

          Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

          GSA Schedule, and provides the highest caliber vendor-authorized

          instruction at our training centers, online, or onsite.

          • 2. Re: Cffile upload not working...no errors either
            smd71 Level 1

            I checked with our service provider, here's what they confirmed:

             

            "The coldfusion process is running under uid 509. This is tied to the coldfusion user. The coldfusion user wasn't part of the 'www' group. I added the coldfusion to this and confirmed this user could then write in the /usr/app/apache/htdocs/test/upload/ directory."

             

            So, yes, sounds to me like CF does have permission. But then why would I not receive any errors but still receive verification that the file was not saved?

             

            smd71

             

            • 3. Re: Cffile upload not working...no errors either
              Adam Cameron. Level 5

              If you've got a hosted solution and part of the solution doesn't work, isn't that something your service provider should be dealing with, rather than you?  I mean: it sounds like it's their bung config, not anything you're doing.  You are paying for this hosting, right?  And it seems like perhaps they're not providing what you're paying for?

               

              That approach might be something to look at whilst also investigating from your end too.

               

              Does doing a dump of the CFFILE (or result) struct tell you anything useful?

               

              Also, before CF can "upload" the file, Apache needs to be able to do the actual uploading. Does the a/c that Apache is running under write to the file system?  All CF does - as far as I can tell - when one does a <cffile action="upload"> is to copy the file from wherever the web server uploads it to, and puts it somewhere more useful for your code.  So the file has to be able to get onto the file system in the first place, before CF gets a look-in.

               

              Do the HTTP response condes on the client cast any light on the scene?

               

              (I'm clutching @ straws a bit here, in case you couldn't tell ;-)

               

              --

              Adam