{"id":13834137,"url":"https://github.com/rot1024/use-file-input","last_synced_at":"2025-03-22T09:50:32.928Z","repository":{"id":49771908,"uuid":"195172888","full_name":"rot1024/use-file-input","owner":"rot1024","description":"React Hooks for file selection with hidden \u003cinput type=\"file\" /\u003e","archived":false,"fork":false,"pushed_at":"2021-06-10T00:36:59.000Z","size":63,"stargazers_count":3,"open_issues_count":4,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-13T22:34:52.346Z","etag":null,"topics":["file-select","file-upload","hooks","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rot1024.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":"2019-07-04T05:14:05.000Z","updated_at":"2021-09-08T10:23:18.000Z","dependencies_parsed_at":"2022-08-02T14:45:18.949Z","dependency_job_id":null,"html_url":"https://github.com/rot1024/use-file-input","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rot1024%2Fuse-file-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rot1024%2Fuse-file-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rot1024%2Fuse-file-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rot1024%2Fuse-file-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rot1024","download_url":"https://codeload.github.com/rot1024/use-file-input/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244937743,"owners_count":20535124,"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":["file-select","file-upload","hooks","react"],"created_at":"2024-08-04T13:00:55.528Z","updated_at":"2025-03-22T09:50:32.904Z","avatar_url":"https://github.com/rot1024.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":[],"readme":"# use-file-input\n\nReact Hooks for selecting files with hidden `\u003cinput type=\"file\" /\u003e`\n\n```sh\nnpm install --save use-file-input\n# or\nyarn add use-file-input\n```\n\n## Usage\n\n```jsx\nimport useFileInput from \"use-file-input\";\n\nconst Component = () =\u003e {\n  const handleFileSelect = useFileInput(\n    (files) =\u003e {\n      // files is FileList\n      // do something with selected files\n    },\n    { accept: \"image/*\", multiple: true }\n  );\n\n  return (\n    \u003cbutton onClick={handleFileSelect}\u003e\n      Select files\n    \u003c/button\u003e\n  );\n};\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frot1024%2Fuse-file-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frot1024%2Fuse-file-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frot1024%2Fuse-file-input/lists"}