View Issue Details

IDProjectCategoryView StatusLast Update
0002075mantisbtbugtrackerpublic2003-12-13 04:44
Reporterupdater Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
PlatformPetTrackerOSWin 98/NT/2000OS Version1.01
Product Version0.17.3 
Summary0002075: Viewing attached image files
Description

Mantis does not correctly display images when they are clicked ( $g_file_upload_method = DATABASE ).

Additional Information

Currently the attached files are only echoed to the browser.

dump file content to the connection.

if ( DISK == $g_file_upload_method ) {
    readfile( $v_diskfile );
} else {
    #echo $v_content;
    # to fix image display
}

It would be great if Mantis cold detect the attachment, display txt/html as it does already and display images correctly when the attachment is clicked on.

TagsNo tags attached.

Activities

vboctor

vboctor

2003-02-26 12:15

manager   ~0003843

Fixed in CVS. Will be included in 0.18.0a3.

Related Changesets

MantisBT: master a943af3d

2003-02-26 06:12

vboctor


Details Diff
This commit includes two related fixes:
- Fix 0002075: Mantis does not correctly display images when they are clicked ( $g_file_upload_method = DATABASE
).
- Fix 0002940: Error when uploading document with no upload path.

M bug_file_add.php
- Moved the checking of the upload path to file_add() in file_api.php

M proj_doc_add.php
- Added checking for the upload path (not empty, exists, writable, and directory)

M core/file_api.php
- (file_add):
- Fixed a bug where filesize was equal to 0. This caused files not to be uploaded to DATABASE.
- Some readability changes.
- Added checking for the upload path (not empty, exists, writable, and directory)
- (file_ensure_valid_upload_path)
- Changed to reject empty paths.

M core/project_api.php
- (project_create): Send path for validation only if not empty.
- (project_update): Send path for validation only if not empty.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2042 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0002075, 0002940
mod - core/project_api.php Diff File
mod - doc/ChangeLog Diff File
mod - proj_doc_add.php Diff File
mod - core/file_api.php Diff File
mod - bug_file_add.php Diff File