WebDAV drag and drop mime type for .msg files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2012 12:09 PM
I am implementing a variation of this solution.
I have added nuxeo xml extensions for the .msg file extension with a mime type of "application/vnd.ms-outlook" in two places:
When I drag and drop an email from ms-outlook email client to a Nuxeo webDAV folder the mime type of .msg file extension files is application/octet-stream, this causes the mime-type the check for the application/vnd.ms-outlook mime type to fail and therefore no conversion of the email takes place as outlined in the blog reference above.
Question: How do I change the mime type for a file which is drag and dropped into Nuxeo through the webDAV interface? I need to see application/vnd.ms-outlook for .msg file extensions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2012 07:48 PM
Using the method call (shown below) to the mimeService in Nuxeo as well as adding a mime extensions for .msg allows me to detect the .msg files even though they are originally set to application/octet-stream. I can then change the mimeType in the Blob to application/vnd.ms-outlook.
I looks like the Nuxeo code just sets everything dropped into a webDAV workspace as an application/octet-stream without any checking; was this done for performance??
String detectedMimeType = mimeService.getMimetypeFromFilenameAndBlobWithDefault(name, content, "application/octet-stream");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2013 10:05 AM
The MIME type should be provided by the WebDAV client when creating the file, as a normal HTTP request header. If the WebDAV client doesn't do that (and if it doesn't I'd consider it broken) we don't introduce further guessing at the moment.
