captbaritone / captbaritone/webamp

Use showDirectoryPicker when supported

Open
#1,251 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
796
PR merge metrics
No merged PRs in 30d

Description

The current implementation shows an "upload" warning dialog makes it seem like I am sending all my mp3 files to the hosted site :

![image](https://github.com/captbaritone/webamp/assets/100364/681076ad-1223-4ec1-8ddf-4dfe13a9a07e)
when in fact I am just giving the web app access to those local files.

[`showDirectoryPicker`](https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker) is supported in a significant portion of browsers ([80% of desktop users](https://caniuse.com/?search=showDirectoryPicker)). It provides a nicer experience by saying "Let site view files?" :

![image](https://github.com/captbaritone/webamp/assets/100364/53f92560-0268-4dbb-aa20-382a2b515842)

`showDirectoryPicker()` just returns a `Promise`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.