Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webdav - Wrong filesize for zip files #234

Closed
jbriens opened this issue Nov 3, 2012 · 7 comments
Closed

Webdav - Wrong filesize for zip files #234

jbriens opened this issue Nov 3, 2012 · 7 comments
Labels

Comments

@jbriens
Copy link

jbriens commented Nov 3, 2012

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
@jbriens
Copy link
Author

jbriens commented Nov 9, 2012

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

@DeepDiver1975
Copy link
Member

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

@evert
Copy link

evert commented Nov 9, 2012

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.

@jbriens
Copy link
Author

jbriens commented Nov 9, 2012

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

@evert
Copy link

evert commented Nov 9, 2012

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

@DeepDiver1975
Copy link
Member

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

@flostru
Copy link

flostru commented Nov 9, 2012

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 :-)

DeepDiver1975 pushed a commit that referenced this issue Nov 22, 2012
@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants