{"id":13456382,"url":"https://github.com/dropzone-ui/file-upload-server-side","last_synced_at":"2025-10-10T05:48:17.398Z","repository":{"id":66358156,"uuid":"403665842","full_name":"dropzone-ui/file-upload-server-side","owner":"dropzone-ui","description":"Server side implemntation for uploading files","archived":false,"fork":false,"pushed_at":"2021-11-01T03:13:40.000Z","size":313,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T10:40:27.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dropzone-ui.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}},"created_at":"2021-09-06T15:07:21.000Z","updated_at":"2025-02-06T14:42:52.000Z","dependencies_parsed_at":"2023-02-22T09:15:16.425Z","dependency_job_id":null,"html_url":"https://github.com/dropzone-ui/file-upload-server-side","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dropzone-ui/file-upload-server-side","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropzone-ui%2Ffile-upload-server-side","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropzone-ui%2Ffile-upload-server-side/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropzone-ui%2Ffile-upload-server-side/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropzone-ui%2Ffile-upload-server-side/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropzone-ui","download_url":"https://codeload.github.com/dropzone-ui/file-upload-server-side/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropzone-ui%2Ffile-upload-server-side/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002864,"owners_count":26083468,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-31T08:01:20.971Z","updated_at":"2025-10-10T05:48:17.358Z","avatar_url":"https://github.com/dropzone-ui.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n\u003cimg align=\"center\" with=\"128px\" height=\"128px\" src=\"https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png\" alt=\"dropone-ui-logo\"\u003e\n\n\u003ch1 align=\"center\"\u003e  Dropzone-UI (file-upload-server-side)\u003c/h1\u003e\nServer side implementations for uploading files.\n\n\u003c/p\u003e\n\n# Express\nServer side implementation for uploading files built with Express.js.\n\n\n## Run server\nFollow the instructions to run the server.\n\n```sh\n#clone this repository\ngit clone https://github.com/dropzone-ui/file-upload-server-side.git\n\n#move to project folder\ncd ./expressjs\n\n#install dependencies\nnpm install\n\n#run server on development mode\nnpm run dev\n```\n\nCongrats! you are done!. Your server is now running on port 2800. \nSo, the url endpoint that must be given to `Dropzone` component is `http://localhost:2800/upload-my-file`.\n\nIf you deploy your server, the url prop will change to `http://\u003cYOUR_SERVER_URL\u003e/upload-my-file`.\n\n# Frontend side\nNow upload some files from a react app using [dropzone-ui](https://www.npmjs.com/package/@dropzone-ui/react) this way:\n\n```jsx\nimport React,{ useState} from \"react\";\nimport { Dropzone, FullScreenPreview, FileItem } from \"@dropzone-ui/react\";\n\nconst SERVER_URL = \"http://localhost:2800\";\n\nconst Example = props =\u003e{\n    const [files, setFiles] = useState([]);\n    const updateFiles = (incommingFiles) =\u003e {\n      console.log(\"incomming files\", incommingFiles);\n      setFiles(incommingFiles);\n    };\n    const handleUpload=(responses)=\u003e{\n      //check the responses here\n      console.log(\"responses\", responses);\n    }\n    const onDelete = (id) =\u003e {\n      setFiles(files.filter((x) =\u003e x.id !== id));\n    };\n \n    return (\n      \u003cDropzone\n        onChange={updateFiles}\n        value={files}\n        onUploadFinish={handleUpload}\n        url={SERVER_URL + \"/upload-my-file\"}\n      \u003e\n        {files.map((file) =\u003e (\n          \u003cFileItem\n            {...file}\n            key={file.id}\n            onDelete={onDelete}\n          /\u003e\n        ))}\n      \u003c/Dropzone\u003e\n    );\n}\nexport default Example;\n```\n\nFor more examples of [dropzone-ui](https://www.npmjs.com/package/@dropzone-ui/react), check [here](https://www.npmjs.com/package/@dropzone-ui/react#Usage-and-examples).\n\n## License\n\nThis project is licensed under the terms of the\n[MIT license](/LICENSE).\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropzone-ui%2Ffile-upload-server-side","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropzone-ui%2Ffile-upload-server-side","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropzone-ui%2Ffile-upload-server-side/lists"}