{"id":21521706,"url":"https://github.com/zzarcon/flat-files","last_synced_at":"2025-08-03T19:32:11.750Z","repository":{"id":26004218,"uuid":"107077111","full_name":"zzarcon/flat-files","owner":"zzarcon","description":"Get a flatten array of dropped files using FileSystem api","archived":false,"fork":false,"pushed_at":"2022-12-13T09:56:53.000Z","size":6351,"stargazers_count":4,"open_issues_count":28,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T11:06:06.949Z","etag":null,"topics":["drag-and-drop","dropzone","files","filesystem","filesystem-api","flatten","flattening"],"latest_commit_sha":null,"homepage":"https://zzarcon.github.io/flat-files","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zzarcon.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}},"created_at":"2017-10-16T04:11:30.000Z","updated_at":"2023-10-04T19:58:19.000Z","dependencies_parsed_at":"2022-07-13T14:10:31.012Z","dependency_job_id":null,"html_url":"https://github.com/zzarcon/flat-files","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Fflat-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Fflat-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Fflat-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Fflat-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzarcon","download_url":"https://codeload.github.com/zzarcon/flat-files/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120520,"owners_count":21050965,"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":["drag-and-drop","dropzone","files","filesystem","filesystem-api","flatten","flattening"],"created_at":"2024-11-24T01:08:05.209Z","updated_at":"2025-04-09T22:22:27.264Z","avatar_url":"https://github.com/zzarcon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flat-files [![Build Status](https://travis-ci.org/zzarcon/flat-files.svg?branch=master)](https://travis-ci.org/zzarcon/flat-files) https://zzarcon.github.io/flat-files\n\u003e Get a flatten array of dropped files using FileSystem api\n\n# Demo\n\nhttps://zzarcon.github.io/flat-files\n\n# Usage\n\n```javascript\nimport flatFiles from 'flat-files';\n\nflatFiles(document.querySelector('#dropzone'), (files: FileSystemEntry[]) =\u003e {\n  files.forEach(file =\u003e {\n    console.log(\n      file.name,\n      file.fullPath,\n      file.getMetadata()\n    );\n  })\n});\n\n```\n\n# Use case\n\nImagine you have drag \u0026 drop support in your app, thats great. Now imagine the use drops a folder containing a folder containing a folder, containing a folder... you get the idea.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"example/matrioska.jpg\" width=\"200\"\u003e\n\u003c/p\u003e\n\nAll that I want is to have a nice way to get all those files and do something with them (upload them, show a preview, etc). Thats what **flat-files** gives to you, it deals with the [FileSystem](https://developer.mozilla.org/en-US/docs/Web/API/FileSystem) and gives a flatten array of [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry)\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"example/homer.gif\" width=\"200\"\u003e\n\u003c/p\u003e\n\n# TODO\n\n* [ ] Release script\n* [ ] Browser support\n* [ ] Error callback","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Fflat-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzarcon%2Fflat-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Fflat-files/lists"}