View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006047 | mantisbt | attachments | public | 2005-07-30 11:10 | 2019-08-30 19:13 |
Reporter | andersg | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | confirmed | Resolution | open | ||
Product Version | 1.0.0a3 | ||||
Summary | 0006047: Mimetype of attached files. | ||||
Description | It would be very nice if file_download.php could report different mimetypes. Something like this in "Attached Files": file1.txt (12345 bytes) [view] [download] [delete] where [view] would send the file with its real mimetype (text/plain resp. audio/mpeg) and [download] would send it with application/octetstream so it is downloaded. | ||||
Tags | No tags attached. | ||||
related to | 0026095 | closed | vboctor | Support inline playing of audio attachments |
related to | 0026102 | closed | vboctor | Support inline playing of video attachments |
parent of | 0011045 | closed | vboctor | Display of attached files |
has duplicate | 0010904 | closed | dhx | Images attached to bugs can not be viewed in FF 3.5 |
related to | 0010722 | acknowledged | Decide attachment preview based on mime type | |
related to | 0011075 | closed | dhx | File downloading - IE vs non-IE filename bugs |
related to | 0011362 | closed | dhx | Picture dowload fails wit exhausted memory error with firefox 3.5.7 but not with IE8 |
This is still valid (and required) for the current version of MantisBT. |
|
I have attempted to implement this feature. A patch is available at http://git.mantisforge.org/w/mantisbt/dhx.git?a=commit;h=2461dbf12ac2f26a834517515750b7dc428b8987 Note that I haven't tested it yet, as it relies upon a feature new to PHP 5.3.0 (which I don't currently have). |
|
@dhx, thanks a lot for the patch. |
|
Thanks for testing! I've pulled that patch into 1.3.x as it'll probably need some more work to fix up some of the old code that handles attachment types (not something for 1.2.x I don't think). |
|
Actually, I will pull this into 1.2.x because as hansj showed, some people may be able to install the PECL extension in PHP <= 5.2.x |
|
I believe the goals of this issue should be address by 0026102 and 0026095 for audio/video inline playing. |
|
MantisBT: master 2461dbf1 2009-09-04 08:50 Details Diff |
Issue 0006047: Use finfo PHP functions to determine file types The finfo class is now standard in PHP 5.3.0 and can be used to determine the MIME type of attachments. It is best to perform this check upon each download so that updates in PHP and the libmagic library behind the scene will apply to all attachments - not just ones created after the update. |
Affected Issues 0006047 |
|
mod - file_download.php | Diff File | ||
MantisBT: master-1.2.x 7d04c49e 2009-09-04 08:50 Details Diff |
Issue 0006047: Use finfo PHP functions to determine file types The finfo class is now standard in PHP 5.3.0 and can be used to determine the MIME type of attachments. It is best to perform this check upon each download so that updates in PHP and the libmagic library behind the scene will apply to all attachments - not just ones created after the update. |
Affected Issues 0006047 |
|
mod - file_download.php | Diff File |