|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
CFFILEUPLOAD total confusion
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.Gene Godsey 05/03/11 03:29 P If you want to go the jQuery route, you could try Uploadify. I recently usedChe Vilnonis 05/03/11 03:35 P <cffileaaron mclean 08/08/12 03:37 A 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. 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. <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
|
May 24, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||