File Viewer. A UI to interact with the [Origin Private File System (OPFS)](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system). API's you will need to learn: - [x] [Drag and Drop API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API) - [x] [Origin Private File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system) - [x] [Svelte 5 (relatively easy)](https://svelte.dev/playground/e62f83d69cea4fda9e8a897f50b5a67c) Code is at `src/lib/components/FileViewer`. Route is at `src/routes/components/files`. If you don't have any files the demo won't show anything. Use the [OPFS-Explorer chrome extension](https://chromewebstore.google.com/detail/opfs-explorer/acndjpgkpaclldomagafnognkcgjignd?hl=en) until this is finished. https://github.com/user-attachments/assets/a5a18c00-b8d1-45cd-8706-a1305f7e8fc5 We will essentially be building something like the OPFS Explorer and I recommend referencing it's source code for examples https://github.com/tomayac/opfs-explorer Tasks: - [x] ~~TODO add script that injects a bunch of random text files and folders for testing~~ You can now create/delete/move folders/files - [x] VS Code Style Filetree with: - [x] Drag and drop visuals - [x] Create new file (button) - [x] Create new folder (button) - [x] Drag and drop (move) files and folders: - [x] file into a folder - [x] folder into another folder (recursively move all it's contents) - [x] Renaming a folder (same operation as moving) - [x] Renaming a file (same operation as moving) - [x] Delete a file - [x] Delete a folder (recursively delete all it's contents)
File Viewer. A UI to interact with the Origin Private File System (OPFS).
API's you will need to learn:
Code is at
src/lib/components/FileViewer.Route is at
src/routes/components/files.If you don't have any files the demo won't show anything. Use the OPFS-Explorer chrome extension until this is finished.
Screen_Recording_2025-09-13_at_12.07.29_AM.mov
We will essentially be building something like the OPFS Explorer and I recommend referencing it's source code for examples https://github.com/tomayac/opfs-explorer
Tasks:
TODO add script that injects a bunch of random text files and folders for testingYou can now create/delete/move folders/files