Wrong file size in files list

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
uwes
Posts: 41
Joined: Mon Oct 01, 2012 8:40 am

Wrong file size in files list

Post by uwes » Thu Jun 28, 2018 3:53 pm

Hi.

I just found that the files list (when creating a download link) shows wrong file sizes. My file was 233 KB large, the files list said it's 911 KB.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Wrong file size in files list

Post by cmb » Thu Jun 28, 2018 5:17 pm

uwes wrote:
Thu Jun 28, 2018 3:53 pm
I just found that the files list (when creating a download link) shows wrong file sizes. My file was 233 KB large, the files list said it's 911 KB.
Is this about a plugin? WDir maybe? Which version exactly?

Or is it about the filebrowser?
Christoph M. Becker – Plugins for CMSimple_XH

uwes
Posts: 41
Joined: Mon Oct 01, 2012 8:40 am

Re: Wrong file size in files list

Post by uwes » Thu Jun 28, 2018 8:14 pm

This is about the CMSimple XH base system.

When you add a link in the editor, there is a selection box called "Link list". It contains all your pages, and at the end you will find all of your files in the /userfiles/downloads folder. The file browser tells me I have a PDF file of "227.8 kb". When I make a link, the "LInk list" tells me the exact same file is "911.1 kb". Another file that is 3.945 bytes large in FileZilla appears to be "15.4 kb" in the "Link list".

Btw: I find it both surprising and annoying that the file browser filters the files in /userfiles/downloads. I found no way to set up the filter scheme, so my .deb, .rpm, .dmg and .asc files remain invisible.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Wrong file size in files list

Post by cmb » Thu Jun 28, 2018 9:50 pm

uwes wrote:
Thu Jun 28, 2018 8:14 pm
When you add a link in the editor, there is a selection box called "Link list". It contains all your pages, and at the end you will find all of your files in the /userfiles/downloads folder. The file browser tells me I have a PDF file of "227.8 kb". When I make a link, the "LInk list" tells me the exact same file is "911.1 kb". Another file that is 3.945 bytes large in FileZilla appears to be "15.4 kb" in the "Link list".
Thanks! Indeed, there is a bug in the tinymce4 plugin. This line is supposed to be:

Code: Select all

                (round((filesize($downloads_path . '/' . $p)) * 10 >> 10) / 10) . 
uwes wrote:
Thu Jun 28, 2018 8:14 pm
Btw: I find it both surprising and annoying that the file browser filters the files in /userfiles/downloads. I found no way to set up the filter scheme, so my .deb, .rpm, .dmg and .asc files remain invisible.
I agree that this is very conservative. Anyhow, you can change it via Plugins → Filebrowser (→ Config); add the other extensions to the respective options in the “Extensions” section. You can also use an asterisk (*) to allow all extensions. (More fancy glob style matching is not yet supported.)

By the way, kudos for distributing .deb and .rpm files, and particularly for .asc (I suppose these are ASCII armored keyssignatures)! Guess CMSimple_XH should catch up on the latter. :)

PS: filed as https://github.com/manu37/tinymce4/issues/20.
Last edited by cmb on Thu Jun 28, 2018 10:05 pm, edited 3 times in total.
Reason: Fix wording
Christoph M. Becker – Plugins for CMSimple_XH

uwes
Posts: 41
Joined: Mon Oct 01, 2012 8:40 am

Re: Wrong file size in files list

Post by uwes » Fri Jun 29, 2018 9:37 am

cmb wrote:
Thu Jun 28, 2018 9:50 pm
I agree that this is very conservative. Anyhow, you can change it via Plugins → Filebrowser (→ Config); add the other extensions to the respective options in the “Extensions” section. You can also use an asterisk (*) to allow all extensions. (More fancy glob style matching is not yet supported.)
Thanks, this is what I was looking for. I was looking throug the CMS settings and the language file as I was not aware that the file section is done through a plugin.

(The .asc file is the public key for a deb repository.)

Post Reply