3 Replies Latest reply on Dec 1, 2008 8:50 PM by mbdooly

    Download problem - Solutions?

    mbdooly
      Hello all
      My problem is hopefully simple but I have no clue as to what I need to do so I turn to the experts -YOU!

      Here it is... I have a login secure area or so I thought, where after login, and password are passed I require another value I call a key that is totally unique so as to keep track of the number of times the file is downloaded. That all is working just as I would hope.

      The big trouble is that should anyone want to go directly to the url where the file is under lock and key, they can dl the file with no trouble.

      Password protection is what I need for the folder I guess. I am on a vpn and am doing the job for another company-

      I have no server privledges so I need to find a way to do the protection strictly with cold fusion. Additionally I do not have access to other servers so web service seems to be out of the question -

      About the proctection, I do not want to have to give everyone the same password and username, because I will not be able to track individual downloads - I hope I am making sense to someone-
      Please help...

      Respectfully
      MDooly
        • 1. Re: Download problem - Solutions?
          Kronin555 Level 1
          You need to serve the file using cfcontent and not have those files in a location that users can request directly. There are plenty of posts in this forum regarding how to do it.

          The minute you send users to a non-CF page (a jpeg, or word doc, or pdf, or excel file), coldfusion isn't involved in the request at all. It goes through the web server.
          • 2. Re: Download problem - Solutions?
            Level 7
            move the file out of web-accessible area (web root).
            serve it up to authorized and authenticated users with appropriate
            combination of <cfheader> and <cfcontent> tags.
            examples and more info in CFML reference.

            Azadi Saryev
            Sabai-dee.com
            http://www.sabai-dee.com/
            • 3. Re: Download problem - Solutions?
              mbdooly Level 1
              I want to thank you for your information. It has lead me down a different path, but I am having some trouble still. My file that I want to rename is not taking on the name I give it properly. I have attached code I am using to this post.

              The filename zipped_files.zip is renamed to zipped_files.1.321C02.efw. I studied the mime type info on the web for proper type and also used the cfheader information that I found in many places. But nothing seems to change the result.

              Please help

              Respectfully

              Mike Dooly