Closed
Bug 31519
Opened 25 years ago
Closed 23 years ago
Save as: should add extension to match content type
Categories
(Core Graveyard :: File Handling, enhancement, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
Future
People
(Reporter: jruderman, Assigned: mscott)
References
(Blocks 1 open bug)
Details
(Keywords: helpwanted, platform-parity)
If the extension of a webpage document isn't given in the URL, or if the extension in the URL doesn't match one of the recognized extensions for the content, mozilla should add an extension to make the saved file be the correct type to ensure that nothing gets lost. URL DEFAULT FILE TYPE http://foo.bar/ index.html Webpage (*.html, *.htm) http://foo.bar/index.html index.html Webpage (*.html, *.htm) http://foo.bar/index.htm index.htm Webpage (*.html, *.htm) http://foo.bar/cgi/cgi.exe cgi.exe.html Webpage (*.html, *.htm) http://foo.bar/cgi/cgi.cgi cgi.cgi.html Webpage (*.html, *.htm) http://foo.bar/cgi/image.cgi image.cgi.gif GIF Image (*.gif) depending on http://foo.bar/cgi/image.cgi image.cgi.jpg JPG Image (*.jpg) the image For each of those, there would also be an "all files (*.*)" option. I'm not sure how much of this is specific to Win32. This should probably only apply to http and https.
Updated•25 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•25 years ago
|
||
moving to XPapps, should belong there.
Assignee: cbegle → don
Component: Browser-General → XPApps
QA Contact: asadotzler → paulmac
Comment 3•25 years ago
|
||
bug exists for index files not getting name (and extension): bug 24817. bill, d'you remember the bug for cgi file saving? it rings familiar...
Assignee: don → law
Yes, and I speculated that I had such a bug in comments I added to yet another bug like this one. However, I can't find any such bug in my current list. So, I think we should keep this one, especially since it does such a good job of mentioning *all* the problem areas.
Reporter | ||
Comment 5•25 years ago
|
||
One thing I forgot to mention explicitly: if a URL ends in .gif but the server gives sends jpeg image (along with a content-type consistent with jpeg), the file should be saved as *.jpg or as *.gif.jpg, because most (Win32?) programs won't figure out that the extension is wrong when trying to read the file later. I've never actually seen a site put bogus extensions in its URLs, but I wouldn't be surprised to see a site try to prevent its users from saving images this way.
Comment 6•24 years ago
|
||
I disagree with this idea. I remember back in IE 3.x somewhere where it was impossible to save some files because the browser insisted that it wanted to add an extension of its own choosing. If this goes in, it should be a preference. Jason
Reporter | ||
Comment 7•24 years ago
|
||
Well, I'm sure this would be done in mozilla in a way that wouldn't prevent you from removing the added extension.
Updated•24 years ago
|
Target Milestone: M16 → Future
Updated•24 years ago
|
Component: XP Apps → XP Apps: GUI Features
Keywords: helpwanted
Reporter | ||
Comment 8•24 years ago
|
||
according to bug 22861, it is possible for cgi scripts to suggest a filename.
wrt Jason Heard, I presume that this is only a suggested file name/type, and since the user can select some other type and some other name.... I also expect we support save as "this.arbitrary", where the quotes force the dropdown specified extension to be ignored, so the file gets the exact name typed w/in the quotes.
Reporter | ||
Comment 10•24 years ago
|
||
Related: bug 67901, "When saving files, file widget should be initialized with page title" (instead of with filename on server).
Reporter | ||
Comment 11•23 years ago
|
||
See also bug 87888, file extension in content-disposition header not used in file-picker filter
Comment 12•23 years ago
|
||
->giving to mscott for the nonce, while bill is away...
Assignee: law → mscott
Status: ASSIGNED → NEW
Comment 13•23 years ago
|
||
I agree that it should automagically detect what type of file it's dealing with and providing the default extension. This would be best when dealing with ASPs or CGIs that give you images but don't really include the extension anywhere in the url. Maybe you could get what type of image it is from ImgLib and give that as the default. Maybe even do the same thing with text, like if a page has no HTML tags in there or no shell commands or something suggest saving as .txt
Comment 14•23 years ago
|
||
on windows the mime type registry goes from mimetype to default extension, we should use that for matching.
Comment 15•23 years ago
|
||
spam: over to File Handling. i have not changed the assigned developer [or the other fields for that matter], so if anyone realizes that a bug should have a more appropriate owner, go ahead and change it. :)
Component: XP Apps: GUI Features → File Handling
Comment 16•23 years ago
|
||
*** Bug 106867 has been marked as a duplicate of this bug. ***
Comment 17•23 years ago
|
||
This is now fixed, modulo bug 57113. The fix landed as part of the "save complete page" changes.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 18•22 years ago
|
||
rs vrfy --related / newer bugs are filed separately.
Status: RESOLVED → VERIFIED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•