View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013217 | mantisbt | attachments | public | 2011-08-08 02:12 | 2011-08-29 07:05 |
Reporter | sz_fisher | Assigned To | dregad | ||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.2.6 | ||||
Summary | 0013217: uploaded file not accessible due to bug in file_api.php, can not create new custom field, mail notification does not work | ||||
Description | I recently upgraded our mantis from 1.1.6 to 1.2.6, everything runs OK except the following
| ||||
Additional Information | upload file storage to disk. | ||||
Tags | No tags attached. | ||||
I believe that the solution you propose for point 3 is not correct. $c_unique_name is the filename, without path, of the attachment (MD5 hash) that will be stored on disk; as you found out it is stored in mantis_bug_file_table.diskfile. The path is stored separately in mantis_bug_file_table.folder. When uploading the attachment, this path is taken from the project's "Upload File Path" or, if unspecified, from global configuration $g_absolute_path_default_upload_folder. I can think of the following scenarios:
You did not specify if the problem occurs with new attachments or with existing ones. In any case I am not able to reproduce the behavior with a fresh 1.2.6 install. |
|
==>I can think of the following scenarios:
let me try to elabrate the situation more clearly as below. |
|
I managed to reproduce your problem by removing the trailing / in $g_absolute_path_default_upload_folder. As documented in config_default_inc.php, the trailing / is mandatory:
Even though you have found a working solution, I suggest that you revert your code changes and set your config_inc as appropriate to avoid future maintenance issues. I guess the code could be improved to properly handle paths without the trailing /, I'll see if that can be done. Now to fix the problem for any "lost" attachments:
Finally, a couple of suggestions to facilitate handling of any future bug reports:
|
|
the relevant setting in my config_inc.php is as following I would like to take this opportunity to thank you for your quick response to my issue report considering the open source nature of this software. hopefully mantis will make big progress in the future. |
|
You're welcome. So you're on Windows... Just a tought (untested, as I don't have any available environment) - the standard delimiter on this OS is "\" not "/" so you may want to test with $g_absolute_path_default_upload_folder = 'D:\uploadfile\database\'; to see if it makes any difference.
This is on purpose, both to avoid duplicate file names and for security reasons. |
|