Adding a widget that displays the current disc usage to the home page#93
Adding a widget that displays the current disc usage to the home page#93Mactory wants to merge 4 commits intoprojectsend:masterfrom
Conversation
|
Hi, How this is work, is if checking everytime the page refresh? Have you test it with big files, lots of file with lots of users connected at the same time? I'm just wondering if it can take a lot of resource to check that info. |
|
Hi, Yes, it is checking each time the page is loaded. I do agree with you, that this could be problematic for large file bases, I did not test this though. On the pro side, i can state, that the file size calculation is done with the help of operating system tools (by usage of the same function as in the file view) which makes it quick. Possible solutions:
I would actually prefer solution 5, as it seems the correct way to me. I would propose to ignore files that are in the uploaded folder but not yet added to the project. The remaining problem would be that files could be changed via FTP. For this I would propose to synchronize the size of a file with the stored value in the database at download time. To implement this myself, I would, however, need some pointers as where to start. Could you point me to the place where I could add the "migration" of the database to add the file size column? I usually program for django in Python, so I'm not using PHP on a daily basis. |
|
I agree with you about solution 5. |
…into disk_usage # Conflicts: # home.php
# Conflicts: # .gitignore # home.php
No description provided.