let the user pick a folder then display the content and read it #9496
-
can i pick a folder in my desktop full of mp3's and give it a interface with javascript |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
For the dialog opening you're looking for this: https://tauri.app/v1/api/js/dialog#open (the second example, but with Then for reading you can use https://tauri.app/v1/api/js/fs#readdir. How you display those paths/filenames is up to you though. |
Beta Was this translation helpful? Give feedback.
-
1st error >>
2nd erorr>>
ive already installed yarn for the error still getting it tho |
Beta Was this translation helpful? Give feedback.
-
yup that was it and setting up configs in the tauri config json file thank you <333333333333 heres the github : https://github.com/anonq115/mp3-anom115 |
Beta Was this translation helpful? Give feedback.
1st You can only consume npm packages if you use a bundler like vite or webpack. Without you'll have to change the import to something like this
2nd - Are you on v2? If so, try appDataDir instead of appDir