Skip to main content
Participant
September 25, 2008
Question

File Upload

  • September 25, 2008
  • 2 replies
  • 268 views
Hello,

First time posting. I'm looking to have a page that will allow users to upload a pdf file and it will create a link to that file on a web page. I've got the file upload down, but I can't get the relative path name to create the link. Right now, I have a second box that says type the file name in, which then gets stored in the database. The file upload sends the file to the server, and my web page uses the file name they typed in to make the link on the page. It'd be nice to just have them be able to browse to the file and I can get the file name from the file upload object and put that into the database.

Thanks
    This topic has been closed for replies.

    2 replies

    Participating Frequently
    September 25, 2008
    > It'd be nice to just have them be able to browse to the file and I can get the file name from the file upload object and put that into the database.

    You can.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_f_10.html#3540091
    Inspiring
    September 25, 2008
    Are you familiar with the 'cffile' structure that is created by
    ColdFusion after a <cffile...> upload operation? It contains all sorts
    of goodies: such as name of the file uploaded by the user, the name of
    the file as saved on the ColdFusion server, if they are different, and
    other valuable information.

    A quick survey can be found by putting <cfdump var="#cffile#"> right
    after your <cffile...> tag. And the full details are throughly covered
    in the <cffile...> page of the documentation available on your server
    and|or the internet.