Search

GlobalSCAPE Knowledge Base

Office 2007 Files save as ZIP

Karla Marsh
EFT Express (SMB) & Enterprise

THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • EFT Server, 6.3 and later, with HTTP/S Module

SYMPTOM

When I use a web browser to connect to EFT Server and download a Microsoft Word 2007 document (ending in ".docx") using the HTML Listing and Upload form/Plain-Text Client (*not* the Web Transfer Client), my browser prompts me to open or save the document, but indicates that the file is a ZIP or RAR file, not a Word document. Similar behavior occurs when downloading files with other extensions—my browser prompts to save or open the file as a document from an unrelated application.

RESOLUTION

To provide the EFT Server computer with the appropriate information to properly determine the MIME type for Microsoft Office 2007 documents, please download and install the "Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint File Formats" from Microsoft (a free download). Run this installer on the EFT Server computer itself. No restart of the computer nor EFT Server service is required—the change takes place immediately. Additional unknown file formats can be manually entered into the EFT Server computer by modifying the registry, by adding a new subkey to "HKEY_CLASSES_ROOT" that has a name of the file extension (including the initial period (dot)), and add a STRING value called "Content Type" (with a space) that contains the desired content-type to be placed in the "Content-Type" HTTP header by EFT Server.

For example, for a file ending in ".gsb" with a Content-Type header value of "application/GlobalSCAPE-EFT-Server," you would create the following in the registry:

[HKEY_CLASSES_ROOT\.gsb]

"Content Type"=STRING:"application/GlobalSCAPE-EFT-Server"

 

 

MORE INFORMATION

The computer on which EFT Server is installed must have awareness of the type of file served up for downloads in order to provide the proper MIME type in the "Content-Type" header over HTTP. If the EFT Server computer cannot determine the MIME type of a file based upon the extension, it will provide a "Content-Type" of "application/octet-stream", which causes the downloading browser to treat the data as an opaque stream of bytes. As a result, the browser is now responsible for determining the content type based upon its own logic; in the case of Internet Explorer downloading a ".docx" file (which is Microsoft Word 2007-formatted document), the browser reads the first few bytes of the file and determines (incorrectly) that the file must be a compressed file such as ZIP or RAR. Other browsers might behave differently, and the browser behavior on opening or saving the document will vary based upon the software installed on the computer running the browser. In general, though, it is often desirable for EFT Server itself to convey the appropriate "Content-Type" to the connecting browsers so that there is no misinterpretation on the browser's part.

Details
Last Modified: 7 Years Ago
Last Modified By: GlobalSCAPE 5
Type: FIX
Rated 2 stars based on 32 votes.
Article has been viewed 28K times.
Options
Also In This Category
Tags