<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I am currently investigating Quota handling on the desktop client. For the basic use case (one user), we have all the means to detect available disk space, which we need to two use cases:</div><div><br></div><div>- Show available space to user</div><div>- Do not try to upload any files as long as we are over quota (<a href="https://github.com/owncloud/mirall/issues/173" class="issue-link" title="Check for exceeding quota before sending file to server" style="margin: 0px; padding: 0px; border: 0px; color: rgb(65, 131, 196); text-decoration: underline; outline: none; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(251, 251, 251);">#173</a>)</div><div><br></div><div>To test, I used the following curl line:</div><div><br></div><div>curl -i -u "user:pwd" -XPROPFIND "<a href="http://oc.thinkpad/remote.php/webdav/">http://oc.thinkpad/remote.php/webdav/</a>" -H "Depth: 0" -d '<?xml version="1.0" ?><D:propfind xmlns:D="DAV:"><D:prop><D:quota-available-bytes/><D:quota-used-bytes/></D:prop></D:propfind>'</div><div><br></div><div>The response:</div><div><br></div><div><div><?xml version="1.0" encoding="utf-8"?></div><div><d:multistatus xmlns:d="DAV:" xmlns:s="<a href="http://sabredav.org/ns">http://sabredav.org/ns</a>"></div><div><d:response><d:href>/remote.php/webdav/Shared/Documents/</d:href></div><div><d:propstat></div><div><d:prop></div><div><d:quota-available-bytes>5368709120</d:quota-available-bytes></div><div><d:quota-used-bytes>0</d:quota-used-bytes></div><div></d:prop></div><div><d:status>HTTP/1.1 200 OK</d:status></div><div></d:propstat></div><div></d:response></div><div></d:multistatus></div></div><div><br></div><div>Which is correct: I am using 0 bytes of my 5GB quota.</div><div><br></div><div>However, it does get tricky when I add a second user, and let him share a folder, e.g. "Documents": </div><div><br></div><div><div>curl -i -u "user:pwd" -XPROPFIND "<a href="http://oc.thinkpad/remote.php/webdav/Shared/Documents">http://oc.thinkpad/remote.php/webdav/Shared/Documents</a>" -H "Depth: 0" -d '<?xml version="1.0" ?><D:propfind xmlns:D="DAV:"><D:prop><D:quota-available-bytes/><D:quota-used-bytes/></D:prop></D:propfind>'</div><div><br></div><div>Yields the same values for quota-available-bytes and quota-used-bytes. If I add a file to the shared folder owned by the other person, its size gets subtracted from my own quota as well.</div><div><br></div><div>Questions:</div><div><br></div><div>1. Is this the intended behavior?</div><div>2. Is this the correct behavior (i.e. does the quota reflect the real limit here). </div><div>3. Is there a way to modify the quota-behavior (i.e. have an extra-quota for the shared folders)?</div><div>4. Is there anything else we (client) need to watch out for?</div><div><br></div><div>Note: I don't want this to be changed. I just want to make sure that if we implement quota-checking in the client, it's going to be correct and robust.</div><div><br></div><div>Cheers,</div><div> Daniel</div><div><br></div><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div><a href="http://www.owncloud.com">www.owncloud.com</a> - Your Data, Your Cloud, Your Way!</div><div><br>ownCloud GmbH, GF: Markus Rex, Holger Dyroff<br>Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)</div></div></div>
</div>
<br></div></body></html>