Opened 5 years ago
Last modified 3 years ago
#1484774 new Feature Requests
Display attachment's filesize next to attachment
| Reported by: | till | Owned by: | till |
|---|---|---|---|
| Priority: | 5 | Milestone: | later |
| Component: | User Interface | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: | darklight.xdarklight@… |
Description
In compose screen.
Also make it pretty - e.g. MB, KB, GB. Double check with quota to re-use code.
Attachments (3)
Change History (11)
comment:1 Changed 5 years ago by thomasb
- Milestone changed from 0.1.1 to 0.1.5
- Type changed from Bugs to Feature Requests
comment:2 Changed 5 years ago by thomasb
- Milestone changed from 0.1.5 to 0.4-beta
Changed 4 years ago by darklight
comment:3 follow-up: ↓ 4 Changed 4 years ago by darklight
- Cc darklight.xdarklight@… added
Hi,
I've added a simple patch which adds this feature
the filesize will be shown right next to the filename
if wanted I can also add the filesize to the title (then tooltip text you see when you put your mouse over the attachment name)
I'm also open for other ideas as I don't have a horizontal space problem (24" monitor solved it =))
comment:4 in reply to: ↑ 3 Changed 4 years ago by alec
Replying to darklight:
I've added a simple patch which adds this feature
the filesize will be shown right next to the filename
As I see, your patch adds size in message view, not in compose. And you're displaying the part size, which is not a real attachment size. Useless.
Changed 4 years ago by darklight
comment:5 Changed 4 years ago by darklight
Hi,
I've added a modified version of my patch
Now the filesize is also shown in the compose dialog/screen
but I still have a question (regarding the filesize of an already stored attachment (in the show mail dialog):
how can I get the real filesize there?
do I have to get the content of the attachment, base64_decode it and then do something like strlen on the data?
I'm pretty clueless here :)
Regards,
darklight
comment:6 follow-up: ↓ 7 Changed 4 years ago by thomasb
Downloading the whole part body is the only way I know so far. But it doesn't make sense to download some megabytes just to display a number. As an alternative you could "guess" the decoded files size by dividing the part size by the factor of the base64 encoding.
Of course this is not absolutely correct but it'll probably give the users enough information about the amount of data they'll have to download.
Changed 4 years ago by darklight
comment:7 in reply to: ↑ 6 Changed 4 years ago by darklight
Replying to thomasb:
Downloading the whole part body is the only way I know so far. But it doesn't make sense to download some megabytes just to display a number.
thought so :)
As an alternative you could "guess" the decoded files size by dividing the part size by the factor of the base64 encoding.
ok, google says this factor is somewhere around 1.33
I've attached a new patch which should implement all features which were requested :)
Regards,
Martin
comment:8 Changed 3 years ago by alec
- Milestone changed from 0.4-beta to later

Is this really a bug? Moving to 0.1.5 since 0.1.1 is meant for important bugfixes.
Suggestion: because lack of horizontal space we could also put the file info into a title attribute.