View Issue Details

IDProjectCategoryView StatusLast Update
0010722mantisbtattachmentspublic2019-09-12 05:57
Reportervboctor Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version1.2.0rc1 
Summary0010722: Decide attachment preview based on mime type
Description

I think we should consider using mime types to decide whether to preview a file or not. We can do preview a file if it matches extensions OR matches mime type. This will have to be used for images / text.

We could match the mime based on prefix, e.g "text/" would match all mime types that start with "text/".

I've done a query on the mime types in this database and here are the results I got.

Text:
text/css
text/html
text/php
text/plain
text/x-delimtext
text/x-diff
text/x-dtd
text/x-patch
text/x-perl
text/x-perl-script
text/x-php
text/x-sql
text/xml
application/javascript
application/x-httpd-php
application/x-javascript
application/x-perl
application/x-php
application/x-shellscript
application/xml-dtd

Images:
image/bmp
image/gif
image/jpeg
image/jpg
image/pjpeg
image/png
image/svg+xml
image/x-ico
image/x-icon
image/x-png

Archives: (we don't currently support previewing these)
application/x-bzip
application/x-bzip2
application/x-compressed
application/x-download
application/x-gzip
application/x-gzip-compressed
application/x-rar
application/x-tar
application/x-tbz
application/x-tgz
application/x-zip
application/x-zip-compressed
application/zip

Other:
application/binary
application/download
application/force-download
application/gzip
application/msword
application/octet-stream
application/octetstream
application/pdf
application/unknown
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/vnd.visio
audio/wav
message/rfc822
unknown/unknown
www/unknown

TagsNo tags attached.

Relationships

related to 0006047 confirmed Mimetype of attached files. 
related to 0026102 assignedvboctor Support inline playing of video attachments 
related to 0026095 assignedvboctor Support inline playing of audio attachments 

Activities

wutsdis

wutsdis

2019-09-12 05:57

reporter   ~0062771

Hello,

I'm not exactly sure if this is related or a new bug should be reported. The inline preview for attached SVG image files is not working.
I have added them in config_inc.php $g_preview_image_extensions = array('bmp', 'png', 'gif', 'jpg', 'jpeg', 'svg');
Also if relevant, the files are stored on the disk $g_file_upload_method = DISK;

Tested this on a clean new XAMPP install with MantisBT version 2.22.0, Apache 2.4.41 and PHP-7.3.9 to be sure.

Or is there something else that I have missed configuring?

Issue History

Date Modified Username Field Change
2009-07-14 03:24 vboctor New Issue
2009-07-14 03:27 vboctor Status new => acknowledged
2009-09-04 09:07 dhx Relationship added related to 0006047
2019-08-30 19:18 vboctor Relationship added related to 0026102
2019-08-30 19:18 vboctor Relationship added related to 0026095
2019-09-12 05:57 wutsdis Note Added: 0062771