Skip to content

Webdav - Wrong filesize for zip files #234

Closed

Description

@jbriens

The filesize of zip files seems overestimated through the webdav interface. It has the following consequences:

  • for files that are already uploaded, the displayed size in windows explorer or any browser is more and less doubled.
  • for files that needs to be uploaded through webdav, an error message appears for files larger than 1Mo: "File too large - The file xxxxxx is too large for the destination file system", whereas according to the owncloud quota and the PHP upload limits, it shouldn't.

Please note that the issue doesn't concerns the web interface, which is working fine (filesize displayed are correct and the same files refused by the webdav interface can be uploaded without any issue).

It is hosted on a mutual hosting server with the following characteristics:

  • Debian 6.0.5 (squeeze)
  • Owncloud 4.5.1a
  • MySQL 5.1 / PHP 5.4

Activity

  1. jbriens commented on Nov 9, 2012

    @jbriens
    Author

    Some additional information:
    I initially had the problem on version 4.5.0, but I have quickly update to 4.5.1a in order to check if it solves the issue. It seems to have solve the wrong size display, but it didn't on the transfer error via Webdav.

    I don't understand why it works with regular files and not zip files. Is it treated differently by the system?

    JM

  2. DeepDiver1975 commented on Nov 9, 2012

    @DeepDiver1975
    Contributor

    @evert Hey - it's me again! ;-) Any ideas? THX

  3. evert commented on Nov 9, 2012

    @evert

    I do not.. the default sabredav classes will just do a filesize() on filenames; I am not aware of a case or system where the result of filesize() would be misreported.

    So this leads me to the only logical conclusion that whatever you use to determine the filesize is wrong.
    If you can link me to the relevant code, I may be able to help a bit though.

  4. jbriens commented on Nov 9, 2012

    @jbriens
    Author

    Hi Evert,

    I feel a little bit dumb: I have tinker with my installation of Owncloud and between updates and changing options on my webhosting space and owncloud options, I was able to make it work.

    The issue is that I don't really know what made it work and I am not able to break it again...

    Is there a way to download an old version of the Owncloud (in my case 4.5.0)? In order to make sure that I didn't dreamed all of this, I would like to be able to reproduce the issue...

    Regards, JM

  5. evert commented on Nov 9, 2012

    @evert

    That's more of a question for Thomas. I'm actually ownclouds greatest competition, with a vested interest to give bad advice. (just kidding)

  6. DeepDiver1975 commented on Nov 9, 2012

    @DeepDiver1975
    Contributor

    The filesize (which is returned via webdav) is taken from the file_cache:
    https://github.com/owncloud/core/blob/master/lib/connector/sabre/file.php#L80

    I'd assume the web gui grabs the same value.

    Let me summon the file cache master: @icewind1991 ;-) THX

  7. flostru commented on Nov 9, 2012

    @flostru

    Hi,

    actually with me it shows roundabout the uncompressed size of the zip in the browser (see picture) and obviously reports that uncompressed size to webdav clients aswell, resulting in corrupted downloads/syncs, atleast on some 3rd party webdav apps (iphone).
    The owncloud iphone app hangs a little while when reaching the real size since it gets uncompressed size reported but then saves it without corruption.
    Weird :-)
    http://www.abload.de/img/oc_zipkriiw.png
    http://www.abload.de/img/oc-zipjismd.png

    edit:
    2nd link showing webdav mount
    Now im not into php programming but could it be a bug/feature in the php zip libraries?

    edit2:
    mac finder bails out with "error -8084" when pulling this file via webdav mount.

    edit3:
    owncloud mac client doesnt sync this file at all

    edit4:
    consequences are bad no zip files synching via webdav when original file is on owncloud.
    upload works for zip, download doesnt.
    Sorry for repeated edits :-)

  8. added a commit that references this issue on Nov 22, 2012
    3e20032
  9. locked as resolved and limited conversation to collaborators on Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions