-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
file manager not showing kb size of files correctly #146
Comments
i got the same problem based on my own information , it does seems it need a minimum of 1024 bytes in size before it even displays anything ( makes sense as it shows in kB instea of kb... and probaly rounded down ) also folders are not suposed to give any filesize 🤕 as long it calculates some file sizes is it fine for me, first i was thinking it dit not show any size at all , but it does work 😄 |
here i am also face same issue after 1 week this problem coming |
Confirmed this issue still persists. It looks like the culprit is on line 205 of filemanager.py:
The file size is converted to an integer. @whattheserver any idea why and if it would break anything if I submitted a pull request to use a rounded float instead? I know rounding isn't very precise with python, but I'm not sure that it matters a whole lot since the data is purely informational/cosmetic. This seems to work fine in testing: |
Funny you should mention this as i was tinkering with some libraries and code about this before and forgot to write it up the first function should be more then adequate and the second should be precise and reusable everywhere from my tests Credits to stackoverflow for both
@usmannasir @aonsyed any thoughts on possibly adding this function or class to a utility as its bound to be handy to use to a nice rounded amount for the filemanager in closest human readable size Although it looks like both old and django has a tool perfectly suited for this built in we could possibly use? https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#filesizeformat |
I would like to follow up on this issue. When viewing created websites, it shows that they are using 0mb of disk space and 0MB of bandwidth. This is totally incorrect as I have a full website installed. This is the same in file manager, it reports that the files are only a few KB but these files are more than that. This is such an important feature that needs to be fixed because users are not able to tell the amount of storage space they are using. Specs: |
@meramsey @jordanlambrecht If either of you ( or whoever else ) wanted to file a PR for this, this still looks to be an issue since it doesn't look to have changed: cyberpanel/filemanager/filemanager.py Line 224 in ab19aba
|
Fix filesize issues usmannasir#146
see this fix @Lvl4Sword Can plop in the one .js file if you don't care about the column header saying KB no matter what |
@spirogg Can you close this? Looks to be fixed. |
in latest version of cyberpanel using litespeed enterprise edition
v 1.9 build 1
If you go to file manager the kb shows 0 in public_html
is there a min before it shows the size?
both
index.html and .htaccess show 0
also the home directory shows 0 kb see snapshots
The text was updated successfully, but these errors were encountered: