{"id":15369166,"url":"https://github.com/developit/browser-nativefs","last_synced_at":"2025-04-14T08:12:17.387Z","repository":{"id":66020006,"uuid":"235823025","full_name":"developit/browser-nativefs","owner":"developit","description":"Native File System API with legacy fallback in the browser","archived":false,"fork":false,"pushed_at":"2020-01-23T15:39:02.000Z","size":48,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T11:16:05.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://browser-nativefs.glitch.me/","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-23T15:22:59.000Z","updated_at":"2023-09-25T07:42:13.000Z","dependencies_parsed_at":"2023-03-05T09:15:30.923Z","dependency_job_id":null,"html_url":"https://github.com/developit/browser-nativefs","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"c1058a5873c8068842537f7acbf717e0d9d97f07"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fbrowser-nativefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fbrowser-nativefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fbrowser-nativefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fbrowser-nativefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developit","download_url":"https://codeload.github.com/developit/browser-nativefs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248843879,"owners_count":21170494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T13:34:29.419Z","updated_at":"2025-04-14T08:12:17.363Z","avatar_url":"https://github.com/developit.png","language":null,"readme":"# Browser-NativeFS\n\nThis module allows you to either use the\n[Native File System API](https://wicg.github.io/native-file-system/) on supporting browsers,\nwith a transparent fallback to the `\u003cinput type=\"file\"\u003e` and `\u003ca download\u003e` legacy methods.\n\n## Usage\n\nThe module feature-detects support for the Native File System API and\nonly loads the actually relevant code.\n\n```js\nimport {\n  fileOpenPromise,\n  fileSavePromise,\n} from 'https://unpkg.com/browser-nativefs';\n\n(async () =\u003e {\n  // This dynamically either loads the Native File System API\n  // or the legacy module.\n  const fileOpen = (await fileOpenPromise).default;\n  const fileSave = (await fileSavePromise).default;\n\n  // Open a file.\n  const blob = await fileOpen({mimeTypes: ['image/*']});\n  // Open multiple files\n  const blobs = await fileOpen({mimeTypes: ['image/*'], multiple: true});\n  // Save a file.\n  await fileSave(blob, {fileName: 'Untitled.png'});\n})();\n```\n\n## API\n\n```js\nconst options = {\n  mimeTypes: ['image/*'],\n  extensions: ['png', 'jpg', 'jpeg', 'webp'],\n  multiple: true,\n  description: 'Image files',\n};\nconst blobs = await fileOpen(options);\n```\n\n```js\nconst options = {\n  fileName: 'Untitled.txt',\n};\nawait fileSave(someBlob, options);\n```\n\n## License\n\nApache 2.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fbrowser-nativefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopit%2Fbrowser-nativefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fbrowser-nativefs/lists"}