The file_download() hook tries to determine a file's mimetype by using the php function mime_content_type(), which isn't always available. Since an IMCE upload does put mimetype data in the "files" table, IMCE should first try to read that data and set the content-type appropriately.

Included is a patch to perform this extra check.

CommentFileSizeAuthor
#2 imce.module.patch1.1 KBufku
imce.module.patch949 bytesartifice
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

artifice’s picture

Note, the patch hard-codes the site "default". This will need to be improved to determine the appropriate file location.

ufku’s picture

Version: master » 6.x-1.x-dev
FileSize
1.1 KB

thanks for pointing this out.
the patch waits for your review.

ufku’s picture

Status: Needs review » Fixed

tested. committed.
please update in case of any problems.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.