View Revisions: Issue #20540

Summary 0020540: Implement upgrade step to cleanup corrupt disk attachments after db->disk conversion
Revision 2016-08-15 04:51 by dregad
Description
  1. Set [ $g_file_upload_method = DISK; ] and configure [ $g_absolute_path_default_upload_folder ] in config_inc.php
  2. Report an issue with attachment.
  3. Check the attachment in mantis_bug_file_table, the content is not null. However, the disk file is also existed in the folder.

3a. If access /admin/move_attachments_page.php, the attachment count is not 0.
3b. If administrator do 'move to disk', the 'diskfile' will be mapping to a new place which file size is 2 bytes. Thus no one can download correct file content.

query result the attachment:
<pre>
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| id | bug_id | title | description | diskfile | filename | folder | filesize | file_type | content | date_added | user_id |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| 5 | 4 | | | b66c36fbdc246d15ca50cb51073b0aca | tempfile.PNG | /volume1/web/wnbu/mantis-attachments/ | 17893 | image/png | '' | 1449109357 | 2 |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
</pre>

Revision 2016-01-25 12:28 by vboctor
Description
  1. Set [ $g_file_upload_method = DISK; ] and configure [ $g_absolute_path_default_upload_folder ] in config_inc.php
  2. Report an issue with attachment.
  3. Check the attachment in mantis_bug_file_table, the content is not null. However, the disk file is also existed in the folder.

3a. If access /admin/move_attachments_page.php, the attachment count is not 0.
3b. If administrator do 'move to disk', the 'diskfile' will be mapping to a new place which file size is 2 bytes. Thus no one can download correct file content.

query result the attachment:

+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| id | bug_id | title | description | diskfile | filename | folder | filesize | file_type | content | date_added | user_id |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+
| 5 | 4 | | | b66c36fbdc246d15ca50cb51073b0aca | tempfile.PNG | /volume1/web/wnbu/mantis-attachments/ | 17893 | image/png | '' | 1449109357 | 2 |
+----+--------+-------+-------------+----------------------------------+--------------+---------------------------------------+----------+-----------+---------+------------+---------+