Closed Bug 301764 Opened 21 years ago Closed 20 years ago

In File size always set to "0" when editing local atttachments

Categories

(Bugzilla :: Attachments & Requests, defect)

2.19.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: altlist, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223 Firefox/1.0 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223 Firefox/1.0 When you click on "edit a local attachment", the file size is always set to 0. That's because attachment.cgi does not use the Bugzilla::Bug::attachments() routine that also returns the datasize. Instead it always uses the LENGTH(attachments.thedata) sql value. Reproducible: Always Steps to Reproduce:
Version: unspecified → 2.19.3
Suggest confirming. I looked over the 2.20 code, and yes, it only checks the size of the in-DB content (which is empty for bigfiles).
Confirmed per karl's comment.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → Bugzilla 2.20
Depends on: 309221
Attachment.pm has been rewritten for 2.22 in bug 302669 and allows us to handle attachments much more easily. This is an easy fix, at least for 2.22.
Assignee: attach-and-request → LpSolit
Attached patch patch for 2.22, v1 (obsolete) — — Splinter Review
use the great new Attachment.pm module.
Attachment #203784 - Flags: review?(myk)
s/thedata/data/
Attachment #203784 - Attachment is obsolete: true
Attachment #203786 - Flags: review?(myk)
Attachment #203784 - Flags: review?(myk)
Comment on attachment 203786 [details] [diff] [review] patch for 2.22, v1.1 Good stuff, no regressions. r=myk
Attachment #203786 - Flags: review?(myk) → review+
I'm too lazy to backport it. Attachment objects do not exist in 2.20.
Status: NEW → ASSIGNED
Flags: approval?
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Flags: approval? → approval+
Checking in attachment.cgi; /cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v <-- attachment.cgi new revision: 1.102; previous revision: 1.101 done Checking in Bugzilla/Attachment.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Attachment.pm,v <-- Attachment.pm new revision: 1.29; previous revision: 1.28 done Checking in template/en/default/filterexceptions.pl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/filterexceptions.pl,v <-- filterexceptions.pl new revision: 1.60; previous revision: 1.59 done Checking in template/en/default/attachment/edit.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/edit.html.tmpl,v <-- edit.html.tmpl new revision: 1.30; previous revision: 1.29 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: