Web Connection
TransmitFile() mimetype not working in Safari for docx files
Gravatar is a globally recognized avatar based on your email address. TransmitFile() mimetype not working in Safari for docx files
  Michael Hogan (Ideate Hosting)
  All
  Aug 4, 2017 @ 01:41pm

I'm finding that response.transmitfile() in WebConnect 5.x works well in most browsers I have tested, but not Safari. The problem appears to be that the mapped url extension used does not match the file extension - BUT I am using the proper mimetype:

lcMimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" lcDocFile = "c:\TestFile.docx" Response.TransmitFile(lcDocFile,lcMimeType)

You can see this behavior by going to http://chicagofudg.com, going to the 'Events' page, and clicking the 'Open Attachment' link for the 'Test Word Document' posting. It works in all browser I have checked EXCEPT Safari.

The PDF filetype DOES work properly is Safari (which you can see by going to http://www.dolphinpoint.net and clicking the 'documents' page).

Thoughts?

Gravatar is a globally recognized avatar based on your email address. re: TransmitFile() mimetype not working in Safari for docx files
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Aug 4, 2017 @ 01:57pm

Do you have Word installed on the target (iOs or Mac)? I think if there's no mime type associated in the host OS it wouldn't know what to do with the Office document. If you install Word for iOS or Mac what happens?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: TransmitFile() mimetype not working in Safari for docx files
  Michael Hogan (Ideate Hosting)
  Michael Hogan (Ideate Hosting)
  Aug 4, 2017 @ 02:06pm

Yes - Word is installed on the Mac target.

Gravatar is a globally recognized avatar based on your email address. re: TransmitFile() mimetype not working in Safari for docx files
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Aug 5, 2017 @ 10:09am

Don't know then - mime type mapping is the responsibility of the browser and how it is handled depends on the browser as well. if a browser doesn't understand a mime type they should let you download the file otherwise the browser tries to run whatever viewer is installed in the browser for that mime type.

Safari is the new IE in that it doesn't support a number of common features that most other browsers do support and Apple is slow to fix/upgrade many of these features.

+++ Rick ---

© 1996-2017