Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display attachment's filesize next to attachment #1329

Closed
rcubetrac opened this issue Feb 14, 2008 · 14 comments
Closed

Display attachment's filesize next to attachment #1329

rcubetrac opened this issue Feb 14, 2008 · 14 comments

Comments

@rcubetrac
Copy link

Reported by @till on 14 Feb 2008 00:55 UTC as Trac ticket #1484774

In compose screen.

Also make it pretty - e.g. MB, KB, GB. Double check with quota to re-use code.

Migrated-From: http://trac.roundcube.net/ticket/1484774

@rcubetrac
Copy link
Author

Comment by @thomascube on 14 Feb 2008 11:16 UTC

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.

@rcubetrac
Copy link
Author

Milestone changed by @thomascube on 14 Feb 2008 11:16 UTC

0.1.1 => 0.1.5

@rcubetrac
Copy link
Author

Milestone changed by @thomascube on 9 Mar 2008 16:42 UTC

0.1.5 => 0.4-beta

@rcubetrac
Copy link
Author

Comment by darklight on 1 Jun 2009 19:03 UTC

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 =))

@rcubetrac
Copy link
Author

Comment by @alecpl on 2 Jun 2009 11:07 UTC

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.

@rcubetrac
Copy link
Author

Comment by darklight on 2 Jun 2009 18:36 UTC

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

@rcubetrac
Copy link
Author

Comment by @thomascube on 3 Jun 2009 12:16 UTC

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.

@rcubetrac
Copy link
Author

Comment by darklight on 3 Jun 2009 18:00 UTC

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

@rcubetrac
Copy link
Author

Milestone changed by @alecpl on 19 Apr 2010 11:21 UTC

0.4-beta => later

@rcubetrac
Copy link
Author

Comment by @alecpl on 9 Oct 2015 08:40 UTC

As I see we already have this implemented but not in compose.

@rcubetrac
Copy link
Author

Owner changed by @alecpl on 9 Oct 2015 08:40 UTC

till => alec

@rcubetrac
Copy link
Author

Milestone changed by @alecpl on 9 Oct 2015 08:40 UTC

later => 1.2-beta

@rcubetrac
Copy link
Author

Comment by @alecpl on 9 Oct 2015 08:54 UTC

Done in bb1ed27.

@rcubetrac
Copy link
Author

Status changed by @alecpl on 9 Oct 2015 08:54 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants