Advertisement

02.13.2008 at 05:39AM PST, ID: 23159495
[x]
Attachment Details

File Upload Content type for .docx

Asked by gibu_george in WebApplications, Miscellaneous Web Development

Hi all,

I'm using the FileUpload control for uploading MS Word and MS PowerPoint
documents.

To check if a user uploads a correct document, I check the contenttype
(FileUpload1.PostedFile.ContentType) of each document, "application/msword"
for MS Word and "application/vnd.ms-powerpoint" for MS PowerPoint.

When moving to the new Office2007 file-formats, DOCX and PPTX, the
contenttype is "application/x-zip-compressed" for both DOCX as PPTX.

Now, I could treat the uploaded document as ZIP-file and check on the
<Application> element in the "app.xml" in the subdir "docProps" in the ZIP
but isn't there an easier way to accomplish the correct MIME content type?

regards
GibuStart Free Trial
[+][-]02.13.2008 at 05:06PM PST, ID: 20890042

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.14.2008 at 01:04AM PST, ID: 20891930

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.14.2008 at 08:20AM PST, ID: 20894620

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: WebApplications, Miscellaneous Web Development
Sign Up Now!
Solution Provided By: GlennaShaw
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628