• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cffile uploadall accept issue!

New Here ,
May 25, 2010 May 25, 2010

Copy link to clipboard

Copied

If I have a cffileupload that points to a page with this code:

<cffile action="uploadAll" destination="#DocPath#\" nameConflict="MakeUnique" result="myDoc" accept="application/msword">

Then I end up with an empty Array.  If I remove the accept tag then I upload the file just fine.  I am uploading a valid msword.doc file.  I have even tried the vnd.openxmlformats-officedocument.wordprocessingml.document for 2007 docx files.  Nothing seems to work and it doesn't give any error, it just doesn't do it.

Any ideas on how to check the mimetype of what to upload?

Views

568

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , May 25, 2010 May 25, 2010

Disclaimer: I have not used the uploadAll version of CFFILE.

The use of the accept attribute to specify allowable MIME types requires that the web browser supply the expected MIME type values in its form post.  I've seen this fail on both web browser and when using a Flex application.  I would avoid use of the accept attribute and write your own validation of the file extension.

Votes

Translate

Translate
Advisor ,
May 25, 2010 May 25, 2010

Copy link to clipboard

Copied

Disclaimer: I have not used the uploadAll version of CFFILE.

The use of the accept attribute to specify allowable MIME types requires that the web browser supply the expected MIME type values in its form post.  I've seen this fail on both web browser and when using a Flex application.  I would avoid use of the accept attribute and write your own validation of the file extension.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2010 May 25, 2010

Copy link to clipboard

Copied

LATEST

I found this article:

http://www.petefreitag.com/item/701.cfm and it had good information on how to make sure people do not upload something that I don't want.  Thanks for your response.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation