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

Return free disk space if quota is set to unlimited #8838

Closed
KopfKrieg opened this issue Mar 15, 2018 · 1 comment
Closed

Return free disk space if quota is set to unlimited #8838

KopfKrieg opened this issue Mar 15, 2018 · 1 comment

Comments

@KopfKrieg
Copy link

Currently, if there's no quota set (alias "unlimited"), users don't know how much free space is available on the server.

It would be nice, if nextcloud would return the free space if the quota is set to unlimited. Currently, this can be simulated by setting the quota > disk space.

@MorrisJobke
Copy link
Member

The propfind will always return the quota type like this:

<d:quota-available-bytes>-3</d:quota-available-bytes>

But if you query the users API https://HOST/ocs/v1.php/cloud/user for example you will get the remaining bytes:

<?xml version="1.0"?>
<ocs>
	<meta>
		<status>ok</status>
		<statuscode>100</statuscode>
		<message>OK</message>
		<totalitems></totalitems>
		<itemsperpage></itemsperpage>
	</meta>
	<data>
		<enabled>true</enabled>
		<id>admin</id>
		<quota>
			<free>145686192128</free>
			<used>164</used>
			<total>145686192292</total>
			<relative>0</relative>
			<quota>-3</quota>
		</quota>
		<email/>
		<phone></phone>
		<address></address>
		<website></website>
		<twitter></twitter>
		<groups>
			<element>admin</element>
		</groups>
		<language>en</language>
		<display-name>admin</display-name>
	</data>
</ocs>

@icewind1991 @rullzer would it make sense to add this to the PROPFIND as well?

@MorrisJobke MorrisJobke changed the title Return free disk space if quota is set to unlimited [Feature request] Return free disk space if quota is set to unlimited Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants