Summary: Wrong filename while downloading files from forums
Creator:Kidman Date:2002-05-04 04:48:06
Project:K-Meleon Owner:jeff
Status:Closed Severity:Major
Version:Unknow Target Version:Unknow

If you click on a file downloadable from a forum, you can save it, but the name is wrong. It's the name of the PHP page, that leads you to the download and not the real filename. It's just a problem with the filename, because you can rename the file and it's okay.
I just had this on "vBulletin" Boards so far.

Test it on this thread:
http://forums.civfanatics.com/showthread.php?s=92758d047d50c08949555d0452d57071&threadid=11840

real fielname: governmentsv6.zip
filename you get: attachment.php

Comments
Kidman  2002-07-10 01:30:08
update: wants to save the file as "governmentsv6.zip.php" in the actual K-Meleon 0.65beta
Kidman  2002-10-28 00:05:04
Happened lately with other files. Seems to be caused by dynamic sites (PHP. ASP, ...). I had .zip files, that became .zip.exe.
amutch  2002-12-01 11:30:45
[Changed Status from "Unconfirmed" to "Open"]
[Changed Owner from "Brian" to "jeff"]
asmpgmr  2002-12-10 16:19:57
This is a general save as dialog bug, it happens with .txt files as well. The summary should be changed.
Save as (ID_FILE_SAVE_AS) doesn't place the filename and file type in the save dialog box but save link as (ID_SAVE_LINK_AS) does. Save as uses the page title (or blank for a text file) as the filename and the type is always web page (.html). It also uses K-Meleon as the download directory instead of kmeleon.general.saveDir, again save link as works correctly.
asmpgmr  2002-12-10 17:29:11
I guess the pref it should use is browser.download.dir
Ulf  2002-12-12 12:48:33
There are plenty of Mozilla bugs with similar issues:
  http://bugzilla.mozilla.org/show_bug.cgi?id=120327
  http://bugzilla.mozilla.org/show_bug.cgi?id=142102
  http://bugzilla.mozilla.org/show_bug.cgi?id=144334
[Changed Status from "Open" to "Open - Mozilla Bug"]
asmpgmr  2002-12-12 18:55:24
I just tried the save as dialog issue in Mozilla 1.2 and it works properly so either this needs to be changed back to "Open" or a separate bug should be opened just for the save dialog problem.
amutch  2002-12-13 21:34:07
This was working in a recent build of MFCEmbed.
Ulf  2002-12-14 08:00:18
There are at least three ways to save a file:
1. Left click a link to open/save a binary file.
2. Right click and choose "Save Link As..." from the context menu.
3. Use "File -> Save As..." to save an open html or text file.
The logic to decide on the right filename is not the same for each case. The last two looks like K-Meleon code, the first not (as far as I can tell). I leave it to Jeff to decide whether this should be split in three or kept as one bug.
[Changed Status from "Open - Mozilla Bug" to "Open"]
asmpgmr  2002-12-16 16:03:00
For binary files, left clicking the link puts the proper filename and type in the save dialog. For text or html files, Save Link As puts the proper filename and type in the save dialog but File->Save As (Ctrl-S) does not. So it is really only a problem in case 3 (ID_FILE_SAVE_AS)
Ulf  2002-12-17 10:36:35
Are we all testing the same example as Kidman posted orginally?
It is Not working for me:
 * Left click (open/save) gives governmentsv6.zip.php
 * Right click (save link as) gives attachment.php
asmpgmr  2002-12-17 12:31:14
No, I'll open a new bug for the problem I'm having.
Ulf  2002-12-20 06:16:35
Sorry, asmpgmr, I wasn't thinking of the File - Save As issue. Didn't both you and Andrew say that left clicking and save or save link as was working in K-Meleon and MFCEmbed? I'm wondering whether those tests were with the same example as posted originally. I have no doubts that all works well when downloading a direct-linked file, but this is when the binary file is served through a script.
asmpgmr  2002-12-20 09:13:58
The problem I'm having ( bug 297) seems to be a general filename problem in the Save As dialog (but not Save Link As). There's a chance that it's related to the issue originally reported here which is why I appended to this bug at first.
amutch  2003-01-27 21:08:03
This is still an issue with Save Link As. It's appending the page type to the file name which is not correct.
amutch  2003-01-29 23:22:42
Setting priority based on Ulf's list.
[Changed Severity from "Normal" to "High Priority"]
Ulf  2003-02-09 09:40:13
The test link by Kidman can be shortened to: http://forums.civfanatics.com/showthread.php?threadid=11840
With the latest mfcembed the file is saved correctly on left click.
Using the kmeleon.exe from km-0.7 build 700 with the same Mozilla components works just as well.
I'd say that the left-click/open/save (with a server that use the wrong content-type?) is a fixed Mozilla bug.
Right clicking still needs to be worked on (but that's not what this bug started as).
What filename will Mozilla/Phoenix suggest when using their "save link as" function, with the same test case? How do they find out the correct name? (if they do)
amutch  2003-02-13 22:30:51
In Mozilla 1.3 beta, right-click "Save Link Target As..." opens dialog with file name "governmentsv6.zip".
Kidman  2003-02-21 05:27:35
I just tried it again in K-Meleon 0.7sp1 and the left-click still gives me the "governments.zip.php". Right-click gives "attachments.php" (is it really wrong!??!?).
amutch: what if the link wouldn't be named the same as the file? maybe mozilla just guesses it? or does the actual version "follow" the link until the transfer of the binary starts?
asmpgmr  2003-10-18 10:22:21
This should be rechecked since the fixes for bug 297 might have fixed this as well.
Kidman  2003-10-24 02:56:07
The problem seems to be fixed in 0.8.0 build 833. I am now getting the right filename, when clicking on the link.
rmn  2003-10-30 02:17:58

[Changed Status from "Open" to "Fixed"]
Ulf  2003-12-16 02:32:14

[Changed Status from "Fixed" to "Closed"]

SourceForge Logo