Closed Bug 328954 Opened 18 years ago Closed 13 years ago

File Open/Save dialog should show file size if possible

Categories

(Toolkit :: Downloads API, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 595888

People

(Reporter: edgaras.janusauskas, Unassigned)

References

Details

Attachments

(4 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

When I click on link and Open/Save dialog appears, I wish to see what download size is, if Content-Length header is sent.

Reproducible: Always

Steps to Reproduce:
1. Click on link, which links to file, not supported by Firefox
2. File Open/Save dialog appears

Actual Results:  
I don't see file size

Expected Results:  
I want see file size
Version: unspecified → 1.5.0.x Branch
Confirming as a valid request. 
But changing Severity from Major to Enhancement.

Imho, this is a desired enhancement though. Could this still make Firefox 2, or should we aim for 3?
Severity: major → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #1)
> Imho, this is a desired enhancement though. Could this still make Firefox 2, or
> should we aim for 3?

Seems like it is quite easy to implement, so I hope it would come in FF 2.0.
I'm trying to get myself acquainted with the Mozilla source code, but i need a bit of guidance here.

As far as i can see, changes are needed to both the dialog itself and the function that calls the dialog.

The dialog would be
toolkit/mozapps/downloads/content/unknownContentType.xul
With the English version of the texts given by
toolkit/locales/en-US/chrome/mozapps/downloads/unknownContentType.dtd

I think i've fixed those parts with the patch that i'll attach shortly. 
However, the size of the download file needs to be passed on to the dialog. Is that part is handled by:
toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in

And that's where i get stuck :S
How do i pass the file size on to the dialog?

UI patch coming up...
This patch still lacks the file size info.
Guys, it's 2 years old bug! Is it so hard to be coded?
Version: 1.5.0.x Branch → Trunk
Product: Firefox → Toolkit
Attached patch Patch adds file size info (obsolete) — Splinter Review
This patch adds a file size info. Tooltip on the file size field shows the exact bytes number.

Maybe UI should be improved (field position and bytes formatting) and localization added.
Guys, please review the patch and check it in.
screenshot?  what about downloads that we don't know the size of?
It is a shot of downloading file with known size
(In reply to comment #10)
> screenshot?  what about downloads that we don't know the size of?

It should show "Unknown" as file size when we don't know its size. If you give URL of such file I'll send screenshot of it.
(In reply to comment #12)
> It should show "Unknown" as file size when we don't know its size. If you give
> URL of such file I'll send screenshot of it.

http://0402.ws/ffnse/get_story.php?id=3758466&zip=true
Now it shows files with unknown size properly
Attachment #354555 - Attachment is obsolete: true
Attachment #354607 - Flags: ui-review?(faaborg)
Attachment #354557 - Flags: ui-review?(faaborg)
I think we should check if size >= 0 or size != -1 (http://mxr.mozilla.org/mozilla/source/netwerk/protocol/http/src/nsHttpTransaction.h#180), because it may be 0 bytes size file.
(In reply to comment #16)
> because it may be 0 bytes size file.

It seemed nonsense for me when I looked at documentation, but you're right - user might download zero-length file.
Attachment #354606 - Attachment is obsolete: true
Attachment #354557 - Flags: ui-review?(faaborg) → ui-review-
Comment on attachment 354557 [details]
Screenshot of file download

Telling the user the size of the download ahead of time is great.

I think the current layout of the information (while just adapting the current dialog) is a bit redundant and overly conversational though.  The type, source, and size are all self describing pieces of information, so instead of

filenamehere.pdf
which is a: Adobe PDF
from: http://download.stuff.com
size: 5.4 MB

we should just write:

filenamehere.pdf
Adobe PDF
http://download.stuff.com
5.4 MB

This will make the information display a little crisper.  We also might want to remove the type line altogether, but that would need to be a new bug.
Comment on attachment 354607 [details]
Screenshot of file download (unknown size)

If we remove the "description: " format, then we can just say "Unknown size" We also might want to use a disabled font color for the text, since this an absence of information, instead of actually useful information.
Attachment #354607 - Flags: ui-review?(faaborg) → ui-review-
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: