Tag Info

Hot answers tagged

30

The files are actually ZIPs of XML documents. Add this to your .htaccess in Apache AddType application/vnd.ms-word.document.macroEnabled.12 docm AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx AddType ...


12

You can use 0 string PK\x03\x04\x14\x00\x06\x00 Microsoft Office Open XML Format in /etc/magic to identify the general file type based on the information you supplied. (However, this might not be universal: PK\x03\x04\x00\x14\x08\x08 has been observed at the start of LibreOffice-generated XLSX files.) Later versions of Ubuntu have a go at ...


11

The server doesn't have proper mime types set up for the new ms file types add the following to the /etc/mime.types file and restart apache and the problem should be fixed. # Added by myname 2009-06-03 application/vnd.ms-word.document.macroEnabled.12 docm application/vnd.openxmlformats-officedocument.wordprocessingml.document docx ...


9

The mime types are probably wrong. Check they're serving the content with Content-type: text/javascript or Content-type: text/css. You can check this using the Network tab of Chrome's Inspector or Firebug. You'll need mod_mime, and ensure you have these lines in your httpd.conf: AddType text/css .css AddType text/javascript .js That should do it.


5

It's not possible. There is a long standing feature request for broadcasting configs to client. It's not presently due until 2.0, or later. The closest you can come is to use hooks. Either with a pre-commit to prevent incorrectly configured clients from submitting the wrong data. Or a post-commit to retro-fix wrong data. Neither is great and I believe the ...


5

The perl-MIME-tools package includes a variety of command-line tools for processing MIME-encoded messages, including mimeexplode: Takes one or more files from the command line that contain MIME messages, and explodes their contents out into subdirectories of the current working directory. The subdirectories are just called "msg0", "msg1", "msg2", etc. ...


4

You can use AddType to force a MIME type, or you can update your magic file.


4

file, version prior to 5.13, will truncate MIME type to 64 characters. So using the content of msooxml, the MIME type from file -bi command becomes "mime application/vnd.openxmlformats-officedocument.wordprocessingml.d; charset=binary"


3

Apache Subversion 1.8 introduced the Repository Dictated Configuration feature which requires SVN 1.8 client. (1.8 server is not required, in other words). With Subversion 1.8, you can configure auto-props patterns within a repository using the new Subversion svn:auto-props inherited property. For example, setting svn:auto-props value to *.bmp = ...


3

While there is no great answer to this, you can use svn_apply_autoprops.py which I wrote to apply your standard auto-props to a working copy to bring all the files there into compliance.


3

You can add an universal MIME type by using the extension "*" and the type "application/octet-stream": http://support.microsoft.com/kb/326965


3

If you want to let nginx guess the right mime type, you juste have to make sure no content-type is returned from your backend server. With django: response = HttpResponse() response['Content-Type'] = '' response['X-Accel-Redirect'] ='/my/file.jpg' return response


3

You can get an authoritative list for your machine by looking at applicationHost.config at %windir%\system32\inetsrv\config\applicationHost.config. Search for mimeMap and it will jump to the first one. The default .zip mime type is 'application/x-zip-compressed'. You can edit with IIS Manager at the server level (MIME Types icon) or you can edit ...


3

I haven't tested this, so take it with a grain of salt, but this should do it; RewriteEngine on RewriteRule ^.*\.js$ - [env=headerjs:1] Header set Content-type application/javascript env=headerjs This is pretty hackish.. if possible, reconsider doing it in the PHP code.


3

Try this directive on your site configuration: DefaultType application/octet-stream Or this one: DefaultType None The default seems to be text/plain: DefaultType Directive Description: MIME content-type that will be sent if the server cannot determine a type in any other way Syntax: DefaultType MIME-type|none Default: DefaultType text/plain ...


3

The Content-ID does not indicate that a image should be displayed inline. This header is needed to reference the embedded data within HTML. As an email is a text-message there is no reason to display an image embedded, as long as the mail is plain-text. Some clients does display the data inline regardless of the format is HTML or plain-text. But this is ...


3

I think you're looking for the Content-Disposition header field, which allows you define the presentation style of a body part (such as an image) to be inline or attachment. Here's an inline example created by Thunderbird: --------------040202010204080305090405 Content-Type: image/png; name="test.png" Content-Transfer-Encoding: base64 Content-ID: ...


3

Modify the mime.types file by adding the following: text/css css Below are the contents of the mime.types file I use on one of my Apache servers. I am fairly certain that it covers pretty much all types of files that your (or any) server may serve up to users. I would suggest making the change to your VPS's mime.types file to include everything ...


2

You don't mention how the messages are being retrieved, but I have seen this before with Exchange 2007 and IMAP retrieval (though I believe it affects POP3 as well). Have a look at this Technet document, specifically the ImapMessagesRetrievalMimeFormat switch. The documentation is exceedingly vague, but Exchange can force the format of the messages as they ...


2

Try: $ openssl smime -sign -in cleartextmail.txt -signer my_cert.pem -text \ | openssl smime -encrypt \ -from you@example.com -to someone@example.org \ -subject "Signed and Encrypted message" \ -des3 user.pem | sendmail someone@example.org


2

Are your docx files trying to be run as zip files from the client? Since Office2007 files are essentially just xml files zipped together, Unix treats them like regular zip files, due to their magic numbers. And thus Apache sends the wrong MIME type headers. A rather succinct answer for this can be found in another serverfault question: ...


2

Sounds like a browser configuration problem. Make sure your browser is configured to download files of the appropriate content type rather than trying to display them. Also, you could try adding the Content-Disposition header, which can be done with the Header directive in Apache: http://httpd.apache.org/docs/2.2/mod/mod%5Fheaders.html#header Here's one ...


2

You are looking at it the wrong way round. A file needs a mimetype so a client knows how to handle the file. Your question should the other way round too: Why do we need file extensions if we can identify file types by the mime type? To which the answer is probably to make is easier for humans to identify what type a file is by looking at the name. ...


2

That only happens in the windows world in the unix world files do not have to have an extension they are identified by mime type.


2

Sounds like your web server is looking at the magic numbers inside these files and seeing that they ARE zip files. Have a look at: http://www.webdeveloper.com/forum/showthread.php?t=162526


2

Add this to conf/web.xml: <mime-mapping> <extension>manifest</extension> <mime-type>text/cache-manifest</mime-type> </mime-mapping>


2

There must be an empty line between the message or MIME headers and the message content: ------=_NextPart_b45f3c386576f1955bb5338634f5047f_alt Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Return ID: 1 Return Date: 11/09/2011 Here you'll need an empty line between Content-Transfer-Encoding: 8bit and Return ID: 1. If Return ID ...


2

is it possible to know which MIME type is used when a file is downloaded This should be the value of the Content-Type HTTP Header. It should be possible to modify your Apache LogFormat line to include the value of the Content-Type Header. %{Content-Type}o. If you are not serving content over HTTPS, then you could install and use wireshark. This ...


2

You can use arguments in statements like $log1 = $ARGV[0] and $log2 = $ARGV[1] and assign them in your $msg->attach section. You can use it like this: while (@ARGV) { $msg->attach( 'Type' => 'text/plain', 'Path' => shift @ARGV ); }



Only top voted, non community-wiki answers of a minimum length are eligible