RE: CFFILE - multiple file uploads
You need to output the variable, instead you have it as filename: cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=#filename# Ade -Original Message- From: Las Selasor [mailto:[EMAIL PROTECTED] Sent: 03 January 2006 17:26 To: CF-Talk Subject: CFFILE - multiple file uploads Hi everyone, I know there is a lot of talk on this tag but I searched for several hours yesterday and could not find an answer to the problem I'm having. I am dynamically creating upload form fields that I am trying to upload to my server. I am receiving a 'The form field specified in the CFFILE tag (FILENAME) does not contain an uploaded file' error. I have pasted some of my code below. As you'll see, I've hardcoded some variables to allow me to troubleshoot: !---BUILD THE FILE NAMES AND FILE UPLOAD FIELDS DYNAMICALLY--- CFOUTPUT !---PROPERTY LISTING ID FROM DB--- !---CFSET ListingID = #getListingID.MAXID#--- cfset ListingID = '3' input type=hidden name=State value=CA input type=hidden name=NumberOfPics value=1 !---BUILD FILE NAME PREFIX--- CFIF ListingID LT 10 CFSET prefix = 0#ListingID# input type=hidden name=prefix value=#prefix# CFELSE CFSET prefix = #ListingID# input type=hidden name=prefix value=#prefix# /CFIF !---CREATE FILE UPLOAD FIELDS--- CFLOOP index=LoopCount from=1 to=1 CFSET myFileName = #prefix#_#FORM.State#_image_#LoopCount# input type=File name=#myFileName#/br / /CFLOOP /CFOUTPUT -- This is my action page: CFLOOP index=LoopCount from=1 to=#FORM.NumberOfPics# cfset filename = #FORM.prefix#_#FORM.State#_image_#LoopCount# cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename CFOUTPUT #filename# /CFOUTPUT -- thank you, SR ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228248 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFFILE - multiple file uploads
Make sure your form enctype is set properly -Original Message- From: Las Selasor [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 12:26 PM To: CF-Talk Subject: CFFILE - multiple file uploads Hi everyone, I know there is a lot of talk on this tag but I searched for several hours yesterday and could not find an answer to the problem I'm having. I am dynamically creating upload form fields that I am trying to upload to my server. I am receiving a 'The form field specified in the CFFILE tag (FILENAME) does not contain an uploaded file' error. I have pasted some of my code below. As you'll see, I've hardcoded some variables to allow me to troubleshoot: !---BUILD THE FILE NAMES AND FILE UPLOAD FIELDS DYNAMICALLY--- CFOUTPUT !---PROPERTY LISTING ID FROM DB--- !---CFSET ListingID = #getListingID.MAXID#--- cfset ListingID = '3' input type=hidden name=State value=CA input type=hidden name=NumberOfPics value=1 !---BUILD FILE NAME PREFIX--- CFIF ListingID LT 10 CFSET prefix = 0#ListingID# input type=hidden name=prefix value=#prefix# CFELSE CFSET prefix = #ListingID# input type=hidden name=prefix value=#prefix# /CFIF !---CREATE FILE UPLOAD FIELDS--- CFLOOP index=LoopCount from=1 to=1 CFSET myFileName = #prefix#_#FORM.State#_image_#LoopCount# input type=File name=#myFileName#/br / /CFLOOP /CFOUTPUT -- This is my action page: CFLOOP index=LoopCount from=1 to=#FORM.NumberOfPics# cfset filename = #FORM.prefix#_#FORM.State#_image_#LoopCount# cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename CFOUTPUT #filename# /CFOUTPUT -- thank you, SR _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228249 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFFILE - multiple file uploads
In your cffile tag, you are telling cf to upload a file it found in a field called filename (not the name it finds in a variable called 'filename') so it's looking for a file field called 'filename' every time it loops. Try this for starters... cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=#filename# ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Las Selasor [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 12:26 PM To: CF-Talk Subject: CFFILE - multiple file uploads Hi everyone, I know there is a lot of talk on this tag but I searched for several hours yesterday and could not find an answer to the problem I'm having. I am dynamically creating upload form fields that I am trying to upload to my server. I am receiving a 'The form field specified in the CFFILE tag (FILENAME) does not contain an uploaded file' error. I have pasted some of my code below. As you'll see, I've hardcoded some variables to allow me to troubleshoot: !---BUILD THE FILE NAMES AND FILE UPLOAD FIELDS DYNAMICALLY--- CFOUTPUT !---PROPERTY LISTING ID FROM DB--- !---CFSET ListingID = #getListingID.MAXID#--- cfset ListingID = '3' input type=hidden name=State value=CA input type=hidden name=NumberOfPics value=1 !---BUILD FILE NAME PREFIX--- CFIF ListingID LT 10 CFSET prefix = 0#ListingID# input type=hidden name=prefix value=#prefix# CFELSE CFSET prefix = #ListingID# input type=hidden name=prefix value=#prefix# /CFIF !---CREATE FILE UPLOAD FIELDS--- CFLOOP index=LoopCount from=1 to=1 CFSET myFileName = #prefix#_#FORM.State#_image_#LoopCount# input type=File name=#myFileName#/br / /CFLOOP /CFOUTPUT -- This is my action page: CFLOOP index=LoopCount from=1 to=#FORM.NumberOfPics# cfset filename = #FORM.prefix#_#FORM.State#_image_#LoopCount# cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename CFOUTPUT #filename# /CFOUTPUT -- thank you, SR _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228250 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFFILE - multiple file uploads
You'd get a different error message if that were the problem. It would also appear before an error about not finding the form field. Invalid content type: application/x-www-form-urlencoded. Ade -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: 03 January 2006 17:32 To: CF-Talk Subject: RE: CFFILE - multiple file uploads Make sure your form enctype is set properly -Original Message- From: Las Selasor [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 12:26 PM To: CF-Talk Subject: CFFILE - multiple file uploads Hi everyone, I know there is a lot of talk on this tag but I searched for several hours yesterday and could not find an answer to the problem I'm having. I am dynamically creating upload form fields that I am trying to upload to my server. I am receiving a 'The form field specified in the CFFILE tag (FILENAME) does not contain an uploaded file' error. I have pasted some of my code below. As you'll see, I've hardcoded some variables to allow me to troubleshoot: !---BUILD THE FILE NAMES AND FILE UPLOAD FIELDS DYNAMICALLY--- CFOUTPUT !---PROPERTY LISTING ID FROM DB--- !---CFSET ListingID = #getListingID.MAXID#--- cfset ListingID = '3' input type=hidden name=State value=CA input type=hidden name=NumberOfPics value=1 !---BUILD FILE NAME PREFIX--- CFIF ListingID LT 10 CFSET prefix = 0#ListingID# input type=hidden name=prefix value=#prefix# CFELSE CFSET prefix = #ListingID# input type=hidden name=prefix value=#prefix# /CFIF !---CREATE FILE UPLOAD FIELDS--- CFLOOP index=LoopCount from=1 to=1 CFSET myFileName = #prefix#_#FORM.State#_image_#LoopCount# input type=File name=#myFileName#/br / /CFLOOP /CFOUTPUT -- This is my action page: CFLOOP index=LoopCount from=1 to=#FORM.NumberOfPics# cfset filename = #FORM.prefix#_#FORM.State#_image_#LoopCount# cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename CFOUTPUT #filename# /CFOUTPUT -- thank you, SR ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228252 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFFILE - multiple file uploads
I don't think this is going to work. But there I think there are some syntax problems. input type=File name=#myFileName#/br / I think this line needs a value parameter. You have a dynamic name for the field, but no value for it. But this may be the Achilles heel of this process. IIRC you can not dynamically set the value of file type inputs. This is a HTML standard issue to prevent unsavory website developers from tricking naive users to upload sensitive files from their system. If you do get the above to work, then there is a problem with this line: cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename I believe that should be: Filefield=#filename# Otherwise you are specifying a filed name the string filename not the value of the filename variable. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228253 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFFILE - multiple file uploads
THANKS GUYS!! The problem is fixed!! From: Adrian Lynch [EMAIL PROTECTED] Reply-To: cf-talk@houseoffusion.com To: CF-Talk cf-talk@houseoffusion.com Subject: RE: CFFILE - multiple file uploads Date: Tue, 3 Jan 2006 17:41:09 - You'd get a different error message if that were the problem. It would also appear before an error about not finding the form field. Invalid content type: application/x-www-form-urlencoded. Ade -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: 03 January 2006 17:32 To: CF-Talk Subject: RE: CFFILE - multiple file uploads Make sure your form enctype is set properly -Original Message- From: Las Selasor [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 12:26 PM To: CF-Talk Subject: CFFILE - multiple file uploads Hi everyone, I know there is a lot of talk on this tag but I searched for several hours yesterday and could not find an answer to the problem I'm having. I am dynamically creating upload form fields that I am trying to upload to my server. I am receiving a 'The form field specified in the CFFILE tag (FILENAME) does not contain an uploaded file' error. I have pasted some of my code below. As you'll see, I've hardcoded some variables to allow me to troubleshoot: !---BUILD THE FILE NAMES AND FILE UPLOAD FIELDS DYNAMICALLY--- CFOUTPUT !---PROPERTY LISTING ID FROM DB--- !---CFSET ListingID = #getListingID.MAXID#--- cfset ListingID = '3' input type=hidden name=State value=CA input type=hidden name=NumberOfPics value=1 !---BUILD FILE NAME PREFIX--- CFIF ListingID LT 10 CFSET prefix = 0#ListingID# input type=hidden name=prefix value=#prefix# CFELSE CFSET prefix = #ListingID# input type=hidden name=prefix value=#prefix# /CFIF !---CREATE FILE UPLOAD FIELDS--- CFLOOP index=LoopCount from=1 to=1 CFSET myFileName = #prefix#_#FORM.State#_image_#LoopCount# input type=File name=#myFileName#/br / /CFLOOP /CFOUTPUT -- This is my action page: CFLOOP index=LoopCount from=1 to=#FORM.NumberOfPics# cfset filename = #FORM.prefix#_#FORM.State#_image_#LoopCount# cffile action=UPLOAD destination=D:\mypath\mypics nameconflict=makeunique filefield=filename CFOUTPUT #filename# /CFOUTPUT -- thank you, SR ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228263 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
multiple file uploads
any comments or suggestions for multiple file upload widgets? anybody using activeFile? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.342 / Virus Database: 189 - Release Date: 3/14/2002 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
multiple file uploads
any comments or suggestions for multiple file upload widgets? anybody using xxxactiveFile its late, i actually meant appletFile. thanks --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.342 / Virus Database: 189 - Release Date: 3/14/2002 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: multiple file uploads
Not using appletFile, but have used cf_fileupload it does a very nice job of handling multiple files .. you can find it in the tag gallery at Macromedia. Paul Giesenhagen QuillDesign http://www.quilldesign.com SiteDirector v2.0 - Commerce Builder any comments or suggestions for multiple file upload widgets? anybody using xxxactiveFile its late, i actually meant appletFile. thanks --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.342 / Virus Database: 189 - Release Date: 3/14/2002 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
CFTTP and multiple file uploads??
Could anyone advise me on the following: Is there anyway of uploading more than 1 file at a time using the cffile and input type=file etc? My predicament is the following: The client has a folder on his c: drive full of images (up to 60, it will be the same folder every time) so instead of uploading them to the server one at a time give him the ability to upload them either all at once or batches of 10 etc. My initial thoughts are to use CFTTP and cfdirectory etc. Has anyone done this before or have any advise. Any advise will be welcome. Thanks in Advance Chris Bohill. __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFTTP and multiple file uploads??
CFFTP will allow your CF machine to connect to another machine as an FTP client. not as an FTP server. christopher olive cto, vp of web development, vp it security atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com -Original Message- From: Chris Bohill [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 9:42 AM To: CF-Talk Subject: CFTTP and multiple file uploads?? Could anyone advise me on the following: Is there anyway of uploading more than 1 file at a time using the cffile and input type=file etc? My predicament is the following: The client has a folder on his c: drive full of images (up to 60, it will be the same folder every time) so instead of uploading them to the server one at a time give him the ability to upload them either all at once or batches of 10 etc. My initial thoughts are to use CFTTP and cfdirectory etc. Has anyone done this before or have any advise. Any advise will be welcome. Thanks in Advance Chris Bohill. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFTTP and multiple file uploads??
An easy way (if you can get them to Zip the directory) is upload the zipped file and use a custom tag on your server to extract the files from the archive. look in: http://devex.macromedia.com/developer/gallery/index.cfm - jim -Original Message- From: Chris Bohill [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 9:42 AM To: CF-Talk Subject: CFTTP and multiple file uploads?? Could anyone advise me on the following: Is there anyway of uploading more than 1 file at a time using the cffile and input type=file etc? My predicament is the following: The client has a folder on his c: drive full of images (up to 60, it will be the same folder every time) so instead of uploading them to the server one at a time give him the ability to upload them either all at once or batches of 10 etc. My initial thoughts are to use CFTTP and cfdirectory etc. Has anyone done this before or have any advise. Any advise will be welcome. Thanks in Advance Chris Bohill. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Multiple file uploads
Thanks for the pointers, it works great On Mon, 08 Jan 2001 21:08:43 -0600, you wrote: It's actually very simple to accomplish. CFFile looks for the name of the form field, so you have to make sure to match these up. In general, the way you do it is to set up a global variable with the number of the form fields that you want. Then you dynamically name and reference the upload form fields with a numbered suffix, and use CFLoop to handle them all. I've found that sometimes the form fields exist even if there is no file, so you should verify both that a given form field exists as well as it has length GT 0 before you run CFFile on it. Matt -Original Message- From: Kevin Willyerd [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 4:37 PM To: CF-Talk Subject: Multiple file uploads Is it possible to upload 5 different files from the same form? The only way I can get it to work is to use a seperate template for each file. Kevin ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Multiple file uploads
Is it possible to upload 5 different files from the same form? The only way I can get it to work is to use a seperate template for each file. Kevin ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Multiple file uploads
It's actually very simple to accomplish. CFFile looks for the name of the form field, so you have to make sure to match these up. In general, the way you do it is to set up a global variable with the number of the form fields that you want. Then you dynamically name and reference the upload form fields with a numbered suffix, and use CFLoop to handle them all. I've found that sometimes the form fields exist even if there is no file, so you should verify both that a given form field exists as well as it has length GT 0 before you run CFFile on it. Matt -Original Message- From: Kevin Willyerd [mailto:[EMAIL PROTECTED]] Sent: Monday, January 08, 2001 4:37 PM To: CF-Talk Subject: Multiple file uploads Is it possible to upload 5 different files from the same form? The only way I can get it to work is to use a seperate template for each file. Kevin ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists