cffile mime type
Hi Folks I am using CF9 creating a form to upload images to website. cffile action=upload fileField=fileUpload result=outcome accept = image/jpg nameConflict = overwrite destination=#mediaPath# I have a photo.jpg which gets the error The MIME type of the uploaded file image/jpeg was not accepted by the server. If I delete the accept = image/jpg it works fine. also is there a way to determine the name of the file to be uploaded before it actually does the upload fileUpload gives a neotmp.tmp which doesn't allow testing of the extension before it is up loaded? Thanks rob Robert J. Voyle, Psy.D. Director, Clergy Leadership Institute For Coaching and Training in Appreciative Inquiry Author: Restoring Hope: Appreciative Strategies to Resolve Grief and Resentment http://www.appreciativeway.com/ 503-647-2378 or 503-647-2382 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353547 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cffile mime type
Just add that mime type to the accept list and it will work. You could extract the filename from the file field and send it to the server in advance using ajax. Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Dec 19, 2012 11:53 PM, Rob Voyle robvo...@voyle.com wrote: Hi Folks I am using CF9 creating a form to upload images to website. cffile action=upload fileField=fileUpload result=outcome accept = image/jpg nameConflict = overwrite destination=#mediaPath# I have a photo.jpg which gets the error The MIME type of the uploaded file image/jpeg was not accepted by the server. If I delete the accept = image/jpg it works fine. also is there a way to determine the name of the file to be uploaded before it actually does the upload fileUpload gives a neotmp.tmp which doesn't allow testing of the extension before it is up loaded? Thanks rob Robert J. Voyle, Psy.D. Director, Clergy Leadership Institute For Coaching and Training in Appreciative Inquiry Author: Restoring Hope: Appreciative Strategies to Resolve Grief and Resentment http://www.appreciativeway.com/ 503-647-2378 or 503-647-2382 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353548 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cffile mime type
Hi Russ Thanks needed accept = image/jpeg not jpg Rob On 19 Dec 2012 at 23:57, Russ Michaels wrote: Just add that mime type to the accept list and it will work. You could extract the filename from the file field and send it to the server in advance using ajax. Hi Folks I am using CF9 creating a form to upload images to website. cffile action=upload fileField=fileUpload result=outcome accept = image/jpg nameConflict = overwrite destination=#mediaPath# I have a photo.jpg which gets the error ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353549 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cffile mime type
Hi Folks Adding the accept doesn't really work as it triggers a CF error message I want to interupt the process before that . I don't know ajax or a way to access the file name before it gets converted to a tmp file Rob On 19 Dec 2012 at 16:16, Rob Voyle wrote: Hi Russ Thanks needed accept = image/jpeg not jpg Rob ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353550 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cffile mime type
javascript checking is not very secure and specially file-extension checking. You can do some sort of javascript check to do a client side validation, but the cffile check is a little more thorough as it checks the file if it is the correct mime-type, even if you rename the extension if I'm not wrong. You should do some basic error handling if the mime-type check throws an coldfusion error and you should be golden. Good luck, Mike 2012/12/20 Rob Voyle robvo...@voyle.com Hi Folks Adding the accept doesn't really work as it triggers a CF error message I want to interupt the process before that . I don't know ajax or a way to access the file name before it gets converted to a tmp file Rob On 19 Dec 2012 at 16:16, Rob Voyle wrote: Hi Russ Thanks needed accept = image/jpeg not jpg Rob ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353551 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cffile mime type
also is there a way to determine the name of the file to be uploaded before it actually does the upload fileUpload gives a neotmp .tmp which doesn't cffile action=upload is a bit of a misnomer. The file is already uploaded by the time your cfm script is processed. In reality cffile action=upload only moves/renames the uploaded file. If I delete the accept = image/jpg it works fine. What mime type is sent? If it really is an image, it could be a non-standard type like Internet Explorer's image/pjpeg. But do not rely on mime types as they are easy to fake. See http://www.petefreitag.com/item/701.cfm -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353552 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFFILE MIME Type - disregard
Never mind that one - I answered my own questions: ClientFileExt... Portent Interactive http://www.portentinteractive.com Process, Design, Content Market Matrix http://www.marketmatrix.com Secure Commerce for Your Business Working together to create powerful, usable web solutions. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.