Re: questions regarding limit attachment size
Shawn Moore <[email protected]> Tue, 12 May 2015 11:28:28 -0400
| Newsgroups | gmane.comp.bug-tracking.request-tracker.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chris, > 2015/05/12 8:49、Christian Loos <[email protected]> のメール: > > Hi, > > I have some questions regarding the functions to limit the attachment > size ($MaxAttachmentSize and $DropLongAttachments set): > > 1. Is it really necessary to log the first 60 characters of a dropped > attachment [1]? I think this is done to make dropped attachments easier to debug. One of the ways to triage any RT problem is to inspect the logs, and including a snippet of the email helps in identifying the problem. > 2. As RT creates a attachment drop transaction (since RT 4.2.7), is it > still necessary to create a text attachment with the Content "Large > attachment dropped" for dropped attachments [2]? > The informations the text attachments make available are also available > by the "attachment drop" transaction (date, user, filename, filesize) > and thus are redundant (just to note that the transaction also shows the > $MaxAttachmentSize). I don’t have any insight into this one, but I’m open to getting rid of the old-style transaction if we can! It’s possible it was intentionally kept around to help preserve backwards compatibility with existing customizations. > 3. Wouldn't it be better to check an uploaded attachment on > Ticket/Create.html and Ticket/Update.html against the $MaxAttachmentSize > and give the user an error message (which gives the user a chance to > attach a smaller attachment) and abort the ticket create/update instead > of creating or updating the ticket with a "attachment drop” transaction Totally agreed. That would be a great improvement. :) > 4. Maybe Ticket/Elements/AddAttachments should show a hint on the > $MaxAttachmentSize (if set) to prevent users from try to upload > attachments which are greater than $MaxAttachmentSize. Same! > Chris > > [1] https://github.com/bestpractical/rt/blob/stable/lib/RT/Record.pm#L832 > [2] https://github.com/bestpractical/rt/blob/stable/lib/RT/Record.pm#L841 Thanks! Shawn