Re: File Upload & CFC
Rob, While I have not used it myself, Massimo's custom tag solution is here: http://www.olimpo.ch/tmt/tag/fileuploader/ I seem to remember someone posting about a CFC solution as well. Dan On 5/4/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: > > Thanks for the pointer Josh, > > I'll be running through this today, if I have any problems then I'll be in > touch. > > Thanks, > > Rob > > -Original Message- > From: Josh Nathanson [mailto:[EMAIL PROTECTED] > Sent: 03 May 2007 19:01 > To: CF-Talk > Subject: Re: File Upload & CFC > > There shouldn't be any problem doing a file upload via a CFC. > > One thing that's helped me is to wrap the file upload action in a > try/catch > block. If it fails, return a message with the error details. If it > succeeds, return an "upload successful" message. > > -- Josh > > > - Original Message - > From: "Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> > To: "CF-Talk" > Sent: Thursday, May 03, 2007 10:06 AM > Subject: File Upload & CFC > > > > Hello Guys, > > > > > > > > I've not really worked with file uploads very much, I've done a couple > of > > small ones using standard procedural methods in CFM pages, but I'm quite > > keen for my next venture to move this into a CFC along with all my other > > 'proper' code. > > > > > > > > Has anyone had any experience with this, what are the pitfalls and the > > general method for uploading the file? Can I simply pass the file from > the > > form into an argument and then process it inside a cfc method with the > > cffile tag? > > > > > > > > Thanks for any ideas or imparted wisdom. > > > > > > > > Rob > > > > > > > > > > > > ~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277104 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: File Upload & CFC
Thanks for the pointer Josh, I'll be running through this today, if I have any problems then I'll be in touch. Thanks, Rob -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: 03 May 2007 19:01 To: CF-Talk Subject: Re: File Upload & CFC There shouldn't be any problem doing a file upload via a CFC. One thing that's helped me is to wrap the file upload action in a try/catch block. If it fails, return a message with the error details. If it succeeds, return an "upload successful" message. -- Josh - Original Message - From: "Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Thursday, May 03, 2007 10:06 AM Subject: File Upload & CFC > Hello Guys, > > > > I've not really worked with file uploads very much, I've done a couple of > small ones using standard procedural methods in CFM pages, but I'm quite > keen for my next venture to move this into a CFC along with all my other > 'proper' code. > > > > Has anyone had any experience with this, what are the pitfalls and the > general method for uploading the file? Can I simply pass the file from the > form into an argument and then process it inside a cfc method with the > cffile tag? > > > > Thanks for any ideas or imparted wisdom. > > > > Rob > > > > ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276986 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: File Upload & CFC
Usually I end up passing the form field name that contains the file to my CFC so that i can perform the cffile action="upload" within my CFC. Beyond that, it's very similar to handling the file via procedural programming. Jake Pilgrim ~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276959 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: File Upload & CFC
There shouldn't be any problem doing a file upload via a CFC. One thing that's helped me is to wrap the file upload action in a try/catch block. If it fails, return a message with the error details. If it succeeds, return an "upload successful" message. -- Josh - Original Message - From: "Robert Rawlins - Think Blue" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Thursday, May 03, 2007 10:06 AM Subject: File Upload & CFC > Hello Guys, > > > > I've not really worked with file uploads very much, I've done a couple of > small ones using standard procedural methods in CFM pages, but I'm quite > keen for my next venture to move this into a CFC along with all my other > 'proper' code. > > > > Has anyone had any experience with this, what are the pitfalls and the > general method for uploading the file? Can I simply pass the file from the > form into an argument and then process it inside a cfc method with the > cffile tag? > > > > Thanks for any ideas or imparted wisdom. > > > > Rob > > > > ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276955 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4