R
Roel
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,
Roel
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,
Roel