Closed
Bug 1062746
Opened 10 years ago
Closed 10 years ago
unable to store files outside of the database due to maxattachmentsize being used instead of maxlocalattachment
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: gundalpha, Assigned: glob)
References
Details
Attachments
(1 file)
644 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Steps to reproduce: if I want to store local file above maxlocalattachment than database, but every attached file was stored at the database... Actual results: every attached file was stored at the database... Expected results: the Bugzilla/Attachment.pm file has a bug at the line 829 I modified the source code as below, then Wanted output made. maybe this code didn't tested... 828 # The file is too large to be stored in the DB, so we store it locally. 829 # DragonPark<gundalpha@hotmail.com> modified 830 # if ($size > Bugzilla->params->{'maxattachmentsize'} * 1024) { 831 if ($size > Bugzilla->params->{'maxlocalattachment'} * 1024) {
Reporter | ||
Comment 1•10 years ago
|
||
After modify the source code of Bugzilla/Attachment.pm , then I can see the local stored file /var/www/bugzilla/data/attachments# ls -la total 16 drwxrwx--- 3 www-data www-data 4096 9월 4 16:25 . drwxrwx--- 8 www-data www-data 4096 9월 4 16:20 .. drwxrwx--- 2 www-data www-data 4096 9월 4 16:25 group.19 -rw-r----- 1 www-data www-data 111 6월 4 09:18 .htaccess /var/www/bugzilla/data/attachments# cd group.19 /var/www/bugzilla/data/attachments/group.19# ls -la total 11348 drwxrwx--- 2 www-data www-data 4096 9월 4 16:25 . drwxrwx--- 3 www-data www-data 4096 9월 4 16:25 .. -rw-r--r-- 1 www-data www-data 11611399 9월 4 16:25 attachment.19
looks like this has never worked!
Status: UNCONFIRMED → NEW
Depends on: 490930
Ever confirmed: true
Summary: maxattachmentsize → unable to store files outside of the database due to maxattachmentsize being used instead of maxlocalattachment
Version: 4.4.4 → 4.2
dragon park: thanks for this report. note maxlocalattachment is in megabytes, while maxattachmentsize is in kilobytes so you have to use a different multiplier.
Reporter | ||
Comment 4•10 years ago
|
||
Why use 1048576 ??? I think 1024 is enough...
sorry, i completely miss-read the descriptions of the parameters. it looks like the current implementation is correct. maxattachmentsize : the maximum size of attachments to be stored in the db. files smaller than this will be stored on the local filesystem (if allowed by the maxlocalattachment setting). maxlocalattachment : the maximum size of attachments to be stored locally (used only when the size of the file is larger than maxattachmentsize). so checking maxattachmentsize _is_ the correct behaviour.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Attachment #8484018 -
Flags: review?(sgreen)
You need to log in
before you can comment on or make changes to this bug.
Description
•