Skip to main content
May 6, 2008
Answered

CFFile action="upload"

  • May 6, 2008
  • 1 reply
  • 467 views
I want to limit the files that are uploaded to be only Office 07 files - Excel, PowerPoint and Word in the "accept" parameter of the tag.

1. This works for Office 07 Excel - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

What works for PowerPoint and Word

These DO NOT WORK:
1. application/vnd.openxmlformats-officedocument.presentationml.presentation - PowerPoint
2. application/vnd.openxmlformats-officedocument.wordprocessingml.document - Word

Any help is greatly appreciated - thank you.

Gary
This topic has been closed for replies.
Correct answer tclaremont
Based on your other post, it sounds like you no longer need a solution to this problem.

I am curious though, do you want to limit it to ALL versions of Excel, PowerPoint and Word, or do you want to exclude all files EXCEPT Office 2007 versions Excel, Word, and Powerpoint?

In other words, do you want to allow a Word 95 file?

1 reply

tclaremont
tclaremontCorrect answer
Inspiring
May 7, 2008
Based on your other post, it sounds like you no longer need a solution to this problem.

I am curious though, do you want to limit it to ALL versions of Excel, PowerPoint and Word, or do you want to exclude all files EXCEPT Office 2007 versions Excel, Word, and Powerpoint?

In other words, do you want to allow a Word 95 file?
Participant
May 22, 2008
I am also having trouble with Word 2007 file verification as garygll stated. I have tried using "application/vnd.openxmlformats-officedocument.wordprocessingml.document" in the accept list but it still throws an exception when trying to upload docx files. Any ideas on what I can try to allow docx files during upload?

Exception detail:
<br>Only files of type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" can be uploaded. <br>Verify that you are uploading a file of the appropriate type.

Coldfusion version 6.1
Thanks,
Darren