Skip navigation
Currently Being Moderated

CffileUpload + cffile.clientDirectory

May 19, 2013 9:29 PM

Tags: #cffile #coldfusion10

I am new to coldfusion. I am using coldfusion-10. I am trying to upload multiple image files using cffileupload. I am able to upload files as expected. But I would like to get the metadata before uploading and get the clientFileDirectory of the uploaded files. PFB code


<cffileupload  name = "uploadDemo"  url="uploadSelectedFiles.cfm"  progressbar="true"  addButtonLabel = "Select File(s)"  clearButtonLabel = "Clear"  width="500"  height="400"  title="Choose Files To Upload"  maxUploadSize="1"  maxFileSelect="10"  extensionfilter="*.gif,*.jpg,*.png,*.doc"  uploadButtonLabel="Upload"  onComplete="previewfile"  >  


<cffile action="uploadall" destination="#expandpath('.')#"  nameconflict="makeUnique" result="uploadResult" />  <cfoutput>try</cfoutput>  <cfdump var="#cffile#">  

But cffile.clientDirectory throws an Status code :500 (unable to upload files too....).One more info, I am not able to view the 'try' string output in the main page (file upload page). Please help...I am posting this afresh to draw more attention and get quicker reply.

  • Currently Being Moderated
    May 20, 2013 6:36 AM   in reply to Sree Viji

    There are 2 things: the 500 error and the display of 'try'. I suspect the error is caused by the attribute onComplete="previewfile". The Javascript it points to may have an error. Remove the attribute, and see what happens.


    To print the string, enclose it with the # symbol, as follows:



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points