Hi,

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:

- Show available space to user
- Do not try to upload any files as long as we are over quota (#173)

To test, I used the following curl line:

curl -i -u "user:pwd" -XPROPFIND "http://oc.thinkpad/remote.php/webdav/"; -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>'

The response:

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns";>
<d:response><d:href>/remote.php/webdav/Shared/Documents/</d:href>
<d:propstat>
<d:prop>
<d:quota-available-bytes>5368709120</d:quota-available-bytes>
<d:quota-used-bytes>0</d:quota-used-bytes>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>

Which is correct: I am using 0 bytes of my 5GB quota.

However, it does get tricky when I add a second user, and let him share a 
folder, e.g. "Documents": 

curl -i -u "user:pwd" -XPROPFIND 
"http://oc.thinkpad/remote.php/webdav/Shared/Documents"; -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>'

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.

Questions:

1. Is this the intended behavior?
2. Is this the correct behavior (i.e. does the quota reflect the real limit 
here). 
3. Is there a way to modify the quota-behavior (i.e. have an extra-quota for 
the shared folders)?
4. Is there anything else we (client) need to watch out for?

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.

Cheers,
  Daniel

--
www.owncloud.com - Your Data, Your Cloud, Your Way!

ownCloud GmbH, GF: Markus Rex, Holger Dyroff
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)

_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to