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

Support file explorer using html #305

Closed
1 of 2 tasks
TomzBench opened this issue Jun 22, 2021 · 8 comments · Fixed by #545
Closed
1 of 2 tasks

Support file explorer using html #305

TomzBench opened this issue Jun 22, 2021 · 8 comments · Fixed by #545

Comments

@TomzBench
Copy link

Is your feature request related to a problem? Please describe.
I am consuming a React component from a library that will open a file explorer. The React component is not aware of Tauri. I am having trouble using this component when inside Tauri. But can use this component in a normal web context.

Describe the solution you'd like
My React File Upload component seemed to work in version 1.0.0-beta.1. However, when upgrading to dev branch as of today, my React File Upload component will no longer open a file explorer. Perhaps something changed in the upgrade. So if possible, it would be nice to opt into file navigation with tauri.conf. I do not know what the configuration would be, because I'm not sure what has changed to no longer allow my component file explorer to work.

Describe alternatives you've considered
I can refactor my React File Upload component to inject an optional tauri dependency and use this dependency in tauri context, and use default behavior when not inside tauri context. However, this is only possible since I maintain the File Upload component. Other users might not have this option when consuming UI libraries (such as Material-UI, etc).

Would you assign yourself to implement this feature?

  • Yes
  • No ...Sorry, I am unaware of the codebase related to this feature
@lemarier
Copy link
Member

lemarier commented Jun 22, 2021

I can confirm on macOS it doesn't work

look like we need to implement an UIDelegate

Are you sure it was working before within tauri webview engine?

If yes, on which OS?

@TomzBench
Copy link
Author

@lemarier

I am using Linux, and my file upload component was working there. I do not know if it worked on Windows or Mac before the upgrade. However i am certain it worked in Linux.

@lemarier
Copy link
Member

I am using Linux, and my file upload component was working there.

It should be fixed now (on Linux) with #310

@TomzBench
Copy link
Author

Thanks. For greater portability should I be using tauri fs api? I develop on linux but ultimately I have to support Windows as well.

@wusyong
Copy link
Member

wusyong commented Jun 24, 2021

@TomzBench yeah, I think it's better to us fs instead. Most panel/modal opening are canceled by default on mac.
It will need to take a while even just to support file panel.

@keiya01
Copy link
Member

keiya01 commented Apr 3, 2022

Could I take on this issue?
Or is it a work in progress by someone else?

@wusyong
Copy link
Member

wusyong commented Apr 3, 2022

@keiya01 Yeah, I believe no one is working on it yet.

keiya01 added a commit to keiya01/wry that referenced this issue Apr 8, 2022
wusyong pushed a commit that referenced this issue Apr 10, 2022
* fix(macos): support file upload panel on MacOS(fix #305)

* chore(examples): add file input element to form.html in examples for testing file upload panel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants