Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[FileUpload addon] Files have wrong MIME type

conigsconigs New
edited March 2011 in Vanilla 2.0 - 2.8
When users upload images and insert them into posts, everything works great. But when a user clicks on the attachment (or also in my case, the image, as I'm using MaxImageSize to keep images within the layout), the file is downloaded instead of being displayed in-browser. For most file-types, this is fine, but this runs counter to how users expect images to be displayed.

It seems the issue only arrises when using the "discussions/downloads" URL, not if linked directly through "uploads/FileUpload/…". But I am unsure how to make this change only for images.

Comments

  • So after digging further, it seems files served up through the "discussions/downloads…" have the incorrect MIME type. They all come up as "application/force-download." It appears this might be intentional, but I'm wondering why? Why not let class.filesystem.php decide how to serve up the file?
  • TimTim Vanilla Staff
    An update to FileUpload is just around the corner. It fixes this and several other issues.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • edited March 2011
    @Tim

    How about idea of anchors, like:

    This is example message

    #Upload1

    next text.

    making easy to insert images (it'll appear on the anchor place).
    And you could use file names instead of #Upload1, if you want.

    P.S. It looks like it forces search here :-) Then using Markdown it do not do this.
Sign In or Register to comment.