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
File download truncates files if quota is reached #5398
Found using OC6 from master.
Quota always refer to owncloud user quota.
If you are about to reach the quota and try to add a new file using New -> From Link the file is downloaded even if it is bigger than the maximum size but only the first X bytes are stored where X is the limit until your quota limit.
Indeed if you have your quota at 100% and you try to add new files then they are downloaded but 0 bytes are stored in them.
This can be fixed using curl as http wrappers does not allow stat functions to get the filesize but I am not sure what do you think about using curl here.
@PVince81 Yeah, that sounds good. If the webserver provides a Content-Length header, find out whether the file fits. Otherwise start downloading and delete the file on failure.
I'm not 100% about removing the quota stream wrapper because we have other cases where truncation could happen and that wrapper could be used to achieve that.
Activity
PVince81 commentedon Oct 22, 2013
Also some web servers might not always return the file size upfront
PVince81 commentedon Oct 22, 2013
I guess the workaround for this now is to delete the file instead of keeping it truncated, then show an error notification.
bantu commentedon Oct 22, 2013
@PVince81 Yeah, that sounds good. If the webserver provides a Content-Length header, find out whether the file fits. Otherwise start downloading and delete the file on failure.
bantu commentedon Oct 23, 2013
@frisco82 curl is not required. the headers are accessible via stream_get_meta_data()
karlitschek commentedon Feb 6, 2014
ping
PVince81 commentedon Mar 10, 2014
The soft quota will not truncate files any more: #7627
bantu commentedon Jun 9, 2014
@PVince81 What is supposed to happen with this?
PVince81 commentedon Jun 10, 2014
I'm not 100% about removing the quota stream wrapper because we have other cases where truncation could happen and that wrapper could be used to achieve that.
I'd say you can ignore my comment above.
PVince81 commentedon Aug 20, 2014
Closing in favor of #10047