Skip to content

File download truncates files if quota is reached #5398

Closed

Description

@friscoMad

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.

Activity

  1. ghost assigned on Oct 21, 2013
  2. PVince81 commented on Oct 22, 2013

    @PVince81
    Contributor

    Also some web servers might not always return the file size upfront

  3. PVince81 commented on Oct 22, 2013

    @PVince81
    Contributor

    I guess the workaround for this now is to delete the file instead of keeping it truncated, then show an error notification.

  4. bantu commented on Oct 22, 2013

    @bantu

    @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.

  5. bantu commented on Oct 23, 2013

    @bantu

    @frisco82 curl is not required. the headers are accessible via stream_get_meta_data()

  6. karlitschek commented on Feb 6, 2014

    @karlitschek
    Contributor

    ping

  7. PVince81 commented on Mar 10, 2014

    @PVince81
    Contributor

    The soft quota will not truncate files any more: #7627

  8. bantu commented on Jun 9, 2014

    @bantu

    @PVince81 What is supposed to happen with this?

  9. PVince81 commented on Jun 10, 2014

    @PVince81
    Contributor

    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.

  10. modified the milestones: , on Jun 24, 2014
  11. PVince81 commented on Aug 20, 2014

    @PVince81
    Contributor

    Closing in favor of #10047

  12. modified the milestones: , on Sep 2, 2014
  13. modified the milestones: archive, on Sep 9, 2014
  14. locked as resolved and limited conversation to collaborators on Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions