Open uazo opened 3 years ago
Hi @uazo, thanks for reporting it. You are right, we return a dummy id (-1) when creating a document. That's because that file won't be written till openDocument
function is called. So we wait till we have an actual file to upload it to the server.
But, considering your use case, we could try to improve this behavior.
thanks for the quick reply. if it can be useful for a quick fix, I seem to understand that other implementations (like drive) return a zero bytes file, which would be fine for me too.
That's because that file won't be written till openDocument function is called.
unfortunately I have not found any way to request an update of the URI: if there was a way that does not require the request for access to the entire folder it would also be fine.
Actual behaviour
I am trying to use SAF to save a file directly in owncloud and the idea is to keep the URI returned so that I can eventually overwrite it. currently the code is
upon receipt of the intent:
I receive as a filePath =
content://org.owncloud.documents/document/-1
. reselecting the same generated document instead returns a correct idExpected behaviour
receive a value like
content://org.owncloud.documents/document/<IDDOCUMENT>
Can this problem be reproduced with the official owncloud server? yes, actually I have
content://org.owncloud.documents/document/-1
Environment data
Android version: A9
Device model: BLN-L22
Stock or customized system: Customized: Omni Rom
ownCloud app version: version 2.16 release 0259f7bef
ownCloud server version: ownCloud 10.4.1 (stable)
Thanks for your help