-
Notifications
You must be signed in to change notification settings - Fork 690
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
fix(droid): FileOpenPicker public path #16863
fix(droid): FileOpenPicker public path #16863
Conversation
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16863/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16863/index.html |
|
||
static class FileSystemUtils | ||
{ | ||
const string FolderHash = "2203693cc04e0be7f4f024d5f9499e13"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this hash coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a directory name. We can name it differently and have a different value, like "UnoPlatform"
I'm not sure if this is reliable, as the user can pick from any arbitrary location and the path will in many cases be not accessible via an actual path, only via that Android SAF framework. There is however a way to cache access to previously opened files (maybe it is just about storing the content URI, I don't remember exactly), so we could use that to implement FutureAccessList API |
Ah, I understand now, so this does copies the picked files into the temporary storage of the app? I'm not sure if that is the ideal, as this means that if a potentially large file is picked, it will take time to copy it as well as it will require additional space on the device. Plus, I think that this change means one cannot do actual read/write changes to picked files, as modifications will actually be done to this private copy instead, so this could even be a breaking change. I guess if that is the only way, it should be responsibility (workaround) of the user to copy the file to temporary storage instead, as the path that is shown there is not the "actual" path to the source file anyway. What do you think @jeromelaban? |
@ajpinedam we discussed with Jerome and actually making a temporary copy would really be potentially breaking. Could you see if there is a way to get the file size from the Android Storage Access Framework URI (https://developer.android.com/guide/topics/providers/document-provider)? Then we could implement the |
Sorry about that close, accidental :-D |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16863/index.html |
@jeromelaban @MartinZikmund here's the PR with the documentation changes related to this issue: #17143 |
Closing as we are not going to go this route as these changes break some other functionality. Refer to the documentation for more information. |
GitHub Issue (If applicable): closes #16587
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):