{"id":18614793,"url":"https://github.com/andrewjbateman/node-file-upload","last_synced_at":"2025-11-03T03:30:28.359Z","repository":{"id":52588842,"uuid":"304879420","full_name":"AndrewJBateman/node-file-upload","owner":"AndrewJBateman","description":":clipboard: Upload files from Angular and React front-ends using Node.js","archived":false,"fork":false,"pushed_at":"2023-07-23T18:20:39.000Z","size":3166,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T02:44:40.552Z","etag":null,"topics":["angular","angular16","backend","busboy-upload","express","expressjs","frontend","frontends","ionic","ionic-angular","ionic-react","multer","node-middleware","nodejs","react","tutorial-code"],"latest_commit_sha":null,"homepage":"","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/AndrewJBateman.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-10-17T13:04:21.000Z","updated_at":"2023-10-06T07:24:52.000Z","dependencies_parsed_at":"2024-11-07T03:40:56.145Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/node-file-upload","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/AndrewJBateman%2Fnode-file-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-file-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-file-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-file-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/node-file-upload/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406449,"owners_count":19633024,"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":["angular","angular16","backend","busboy-upload","express","expressjs","frontend","frontends","ionic","ionic-angular","ionic-react","multer","node-middleware","nodejs","react","tutorial-code"],"created_at":"2024-11-07T03:27:00.247Z","updated_at":"2025-11-03T03:30:28.328Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","readme":"# :zap: Node File Upload\n\n* Uploads image files selected by the user from an Ionic frontend to a Node.js backend folder.\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/node-file-upload?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/node-file-upload?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/node-file-upload?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/node-file-upload?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Node File Upload](#zap-node-file-upload)\n\t* [:page\\_facing\\_up: Table of contents](#page_facing_up-table-of-contents)\n\t* [:books: General info](#books-general-info)\n\t* [:camera: Screenshots](#camera-screenshots)\n\t* [:signal\\_strength: Technologies](#signal_strength-technologies)\n\t* [:floppy\\_disk: Setup](#floppy_disk-setup)\n\t* [:computer: Code Examples](#computer-code-examples)\n\t* [:cool: Features](#cool-features)\n\t* [:clipboard: Status \\\u0026 To-Do List](#clipboard-status--to-do-list)\n\t* [:clap: Inspiration](#clap-inspiration)\n\t* [:file\\_folder: License](#file_folder-license)\n\t* [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Very simple backend using node with express and multer to load image files.\n* Client frontend uses Ionic-Angular or Ionic-React to show user controls to upload file from PC file system.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/frontend.png)\n\n## :signal_strength: Technologies\n\n**Frontends:**\n\n* [Angular v16](https://angular.io/)\n* [ionic/angular v7](https://www.npmjs.com/package/@ionic/angular) angular building blocks for Ionic\n* [ionic/react v7](https://www.npmjs.com/package/@ionic/react) react building blocks for Ionic. Don't update to v6 due to React breaking changes\n\n**Backend:**\n\n* [cors](https://www.npmjs.com/package/cors) Cross Origin Resource Sharing Connect/Express middleware\n* [Express v4](https://expressjs.com/) Node.js middleware, includes body parsing\n* [Morgan v1](https://www.npmjs.com/package/morgan) HTTP request logger middleware for node.js\n* [Multer v1](https://www.npmjs.com/package/multer) Middleware for handling `multipart/form-data`.\n* [Busboy](https://github.com/mscdex/busboy) used by Multer as a streaming parser for HTML form data for node.js\n\n## :floppy_disk: Setup\n\n**/Ionic-Angular \u0026 /Ionic-React Frontends:**\n\n* `cd client-angular` then `npm i` to install Angular frontend dependencies\n* `cd client-react` then `npm i` to install React frontend dependencies\n* I had to have a Google Chrome CORS extension activated for this to work\n* Angular frontend: Run `ionic serve` \u0026 navigate to `http://localhost:8080/` or `ng serve` \u0026 navigate to `http://localhost:4200/` to run server. The app will automatically reload if you change any of the source files.\n* React frontend: Run `npm run start` \u0026 navigate to `http://localhost:3001/`\n* The apps will automatically reload if you change any of the source files.\n\n**/server-express Backend:**\n\n* `cd server-express` then `npm i` to install backend dependencies\n* Run `node index.js` for a node.js server. Backend does not update automatically as nodemon not used\n\n## :computer: Code Examples\n\n* Extract from `server-express/index.js` to show use of dependencies and posting of objects to uploads folder.\n\n```javascript\napp.use(cors());\napp.use(morgan(\"combined\"));\napp.use(express.json());\napp.use(express.urlencoded({ extended: true }));\n\napp.post(\"/upload\", upload.single(\"photo\"), (req, res) =\u003e {\n  console.log(req.file);\n});\n\napp.post(\"/uploads\", upload.array(\"photos[]\"), (req, res) =\u003e {\n  console.log(req.files);\n});\n```\n\n## :cool: Features\n\n* Tutorial shows different front-ends that can be used to pass objects to the backend\n* Backend 'uploads' folder is automically created if it does not exist already.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Nothing. There is repeated frontend ionic-angular code and scope for refactoring - I am leaving it as is for now.\n\n## :clap: Inspiration\n\n* [Joshua Morony: Youtube: How to upload files to a server with Ionic](https://www.youtube.com/watch?v=tcWTl7tBT5E\u0026ck_subscriber_id=433042050)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: `gomezbateman@yahoo.com`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-file-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fnode-file-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-file-upload/lists"}