-
Notifications
You must be signed in to change notification settings - Fork 115
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
File gets truncated on save when quota is exceeded #3281
Comments
Thanks for reporting. I would not expect the Nextcloud storage layers to truncated the file when the storage throws an out of quota exception but I might be wrong there. I'll check that on our side. For the error, we can definitely report back such a case on the WOPI request. It actually would be good to know the size upfront to we do not even attempt to write larger files if they don't fit.
Regarding reporting back we might need to agree on a response status and format to give back a custom error message as WOPI itself only defines some basic status codes and no format for a response body https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/rest/files/putfile#status-codes However I think error message hand over to also show something to the user would be nice in any failure case |
We can check for the quota with something like this: Server storage layer does not check the quota upfront as is just does a stream copy without being aware of the size.
|
@thebearon What do you think about adding a new status code for this in https://github.com/CollaboraOnline/online/blob/db31a486dfbf42669662b2b2d8db74bf99f881a0/wsd/Storage.hpp#L311 ? We could actually extend this even further with a custom error message that Nextcloud could return, e.g. to indicate more clearly what to check in other error cases like of https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/rest/files/putfile#status-codes |
@pedropintosilva Something we probably can discuss next week in our call, I think having a way to report the proper root cause back to the user within Collabora Online would be really benificial here to not just show a generic error if the save has failed. |
Filed CollaboraOnline/online#8713 upstream for improved error reporting |
-> Error message:
Document cannot be saved, please check your permissions
, andDocument has been changed
popup right afterwards.More importantly, the file itself is truncated in storage.
Expectation:
The text was updated successfully, but these errors were encountered: