Closed Bug 584110 Opened 14 years ago Closed 14 years ago

Don't name attachment files "attachment.txt" by default, because this confuses IE

Categories

(Bugzilla :: Attachments & Requests, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: LpSolit, Assigned: LpSolit)

References

()

Details

Attachments

(1 file)

As I said on my blog (see the URL field), if an attachment is named "attachment.txt" (or "attachment.html", etc...), IE 6 and IE8 (and I guess IE7 too) automatically download the attachment instead of displaying it inline. They totally ignore the MIME type. Bug "attachment.txt" is the name I used for attachments created by pasting text into the text field, see bug 119703. So we must choose a better name, e.g. "file.txt", which doesn't confuse IE.
Attached patch patch, v1Splinter Review
Appending the bug ID generates some randomness which will prevent too many files to have the same name, just in case.
Attachment #462573 - Flags: review+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified attachment.cgi
modified post_bug.cgi
Committed revision 7422.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: approval+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: