You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Quota ignored in backend when uploading files into shared dir (non-public) #5697
Create two users, user1 and user2 both with quota 100 MB
Login as user1
Refresh the page (to rule out another known bug)
Upload a 90 MB file.
Create a folder "test"
Share "test" with user2 and make sure to allow editing ("can edit" is checked)
Login as user2
Refresh the page (to rule out another known bug)
Go to "/Shared/test"
Upload a 90 MB file
Refresh the page
Upload another 90 MB file
Repeat 12 many times
If you check the DB, you'll see that the size of the root folder for both users will not change, regardless whether you upload new files or deleted them from the shared dir.
If user2 also has other files, the max upload size might be smaller as is it calculated on the actual quota. Still, you will be able to upload the same file many times as long as that file's size is smaller than the allowed size displayed in the UI.
It looks like this kind of file upload is bypassing the quota stream from lib/private/files/stream/quota.php (CC @icewind1991)
If I login as user1 and force scan using "scanFiles(true)" in the Chrome console, the total file size for the root is correctly updated.
So there are at least two issues here:
Quota stream must be used when uploading to shared dir
File that lands in another user's storage need to be counted in the total size (the size must propagate to the parent dirs, maybe a quick scan could trigger this)
It looks like the total size is propagated up to the dir under "/Shared" but not up to the root.
Maybe the logic from Updater::correctFolderSize() can be used, that one updates etags even when crossing storage boundaries. We could try and update the sizes there as well.
CC @schiesbn
It looks like the watcher from the sharing app is already updating the sizes of the folders, but only up to the user's "/Shared" dir. I'll see whether I can re-route the update to be done directly on the owner's storage/view instead of through the shared storage wrapper.
Activity
PVince81 commentedon Nov 5, 2013
If I login as user1 and force scan using "scanFiles(true)" in the Chrome console, the total file size for the root is correctly updated.
So there are at least two issues here:
PVince81 commentedon Nov 5, 2013
It looks like the total size is propagated up to the dir under "/Shared" but not up to the root.
Maybe the logic from Updater::correctFolderSize() can be used, that one updates etags even when crossing storage boundaries. We could try and update the sizes there as well.
CC @schiesbn
PVince81 commentedon Nov 5, 2013
It looks like the watcher from the sharing app is already updating the sizes of the folders, but only up to the user's "/Shared" dir. I'll see whether I can re-route the update to be done directly on the owner's storage/view instead of through the shared storage wrapper.
PVince81 commentedon Nov 6, 2013
Here is a list of the issues:
PVince81 commentedon Nov 25, 2013
All issues were addressed, closing