Browse a local folder using DRF

How to browse a local folder that contains multiple folders containing images based on the user input directory.

Are you talking about examining a directory structure on the user’s computer?

The user wants to upload a local folder from his computer. I want to access this folder and get the images inside it. I don’t want the user to upload multiple images by himself.

See StorageManager - Web APIs | MDN, particularly the getDirectory method for how to gain access to a user-identified directory from within JavaScript.

Once you get the directory handle, you then have all the functions defined at FileSystemDirectoryHandle - Web APIs | MDN available to you.

1 Like