House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFFILEUPLOAD total confusion

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gene Godsey
05/03/2011 03:29 PM

I have been on adobe forums,  I have dialogued with Ray Camden and scoured the web. I will also say that I have been doing CF for a long time but this one has me stumped. call me dumb but it is what it is. Here is my index.cfm file: -------------------------------------------------------------------------------------------------------------------------- <cffileupload       url="index_action.cfm?#urlEncodedFormat(session.urlToken)#"     progressbar="true"     name="myupload"     width=400     height=300     title = "UPLOAD MULTIPLE FILES TO PRIVATE FOLDER"     maxuploadsize="200"     extensionfilter="*.jpg, *.png, *.flv, *.txt, *.doc, *.docx, *.xls, *.xlsx *.pdf"     BGCOLOR="##0078AE"     MAXFILESELECT="10" /> -------------------------------------------------------------------------------------------------------------------------- Here is the action file called: index_action.cfm -------------------------------------------------------------------------------------------------------------------------- <cffile action="uploadall"     destination="#expandPath('uploads')#"     nameconflict="overwrite"     result="myVar" />          <cfdump var="#myVar#">          <cfset str.STATUS = 200>     <cfset str.MESSAGE = "passed">     <cfoutput>#serializeJSON(str)#</cfoutput> -------------------------------------------------------------------------------------------------------------------------- Well we all know this s a flash application so there is not a postback to the server. I need the filename of the uploads to be available to me so I can insert the names into the database via the directory that are in. this will allow the users of the site to download and read the given files. My problem is that I do not know how to return the file names so I can insert them into the given data table. There is no return here. All I can imagine is there must be some kind of JavaScript the will provide me with the name so I can insert the names as the files are uploaded to the given directory. Question 1: How do I get the application to retrieve and provide the file or files name(s)? Question 2: Is this display an actual output or is this .cgi information that I pull behind the seens? Question 3: If this is done with jQuery or some kind of JavaScript call is it possible to get an example to I can replicate it in process? Thanks in advance.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
05/03/2011 03:35 PM

If you want to go the jQuery route, you could try Uploadify. I recently used it and had no issues. http://www.uploadify.com/ Regards, Che I have been on adobe forums,  I have dialogued with Ray Camden and scoured the web. I will also say that I have been doing CF for a long time but this one has me stumped. call me dumb but it is what it is. Here is my index.cfm file: ---------------------------------------------------------------------------- ---------------------------------------------- <cffileupload       url="index_action.cfm?#urlEncodedFormat(session.urlToken)#"     progressbar="true"     name="myupload"     width=400     height=300     title = "UPLOAD MULTIPLE FILES TO PRIVATE FOLDER"     maxuploadsize="200"     extensionfilter="*.jpg, *.png, *.flv, *.txt, *.doc, *.docx, *.xls, *.xlsx *.pdf"     BGCOLOR="##0078AE"     MAXFILESELECT="10" /> ---------------------------------------------------------------------------- ---------------------------------------------- Here is the action file called: index_action.cfm ---------------------------------------------------------------------------- ---------------------------------------------- <cffile action="uploadall"     destination="#expandPath('uploads')#"     nameconflict="overwrite"     result="myVar" />          <cfdump var="#myVar#">          <cfset str.STATUS = 200>     <cfset str.MESSAGE = "passed">     <cfoutput>#serializeJSON(str)#</cfoutput> ---------------------------------------------------------------------------- ---------------------------------------------- Well we all know this s a flash application so there is not a postback to the server. I need the filename of the uploads to be available to me so I can insert the names into the database via the directory that are in. this will allow the users of the site to download and read the given files. My problem is that I do not know how to return the file names so I can insert them into the given data table. There is no return here. All I can imagine is there must be some kind of JavaScript the will provide me with the name so I can insert the names as the files are uploaded to the given directory. Question 1: How do I get the application to retrieve and provide the file or files name(s)? Question 2: Is this display an actual output or is this .cgi information that I pull behind the seens? Question 3: If this is done with jQuery or some kind of JavaScript call is it possible to get an example to I can replicate it in process? Thanks in advance.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
aaron mclean
08/08/2012 03:37 AM

<cffile   action="upload"   destination="E:\docs\probmgmt\_tempFiles\upload\"   nameConflict="overwrite" /> <cfset PhysicalPath = GetDirectoryFromPath(GetCurrentTemplatePath())> <cf_sanfile action="append" file="#PhysicalPath#errorlog.txt" output="#cffile.clientFile#" nameConflict = "overwrite"> This will dump out a list of your file names to a temp file called errorlog.txt. You can see that #cffile.clientFile# will tell you the names of your files 1 at a time. Your upload file gets called once for each file


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference