{"id":18615012,"url":"https://github.com/andrewjbateman/file-metadata","last_synced_at":"2026-04-26T22:31:17.428Z","repository":{"id":42714630,"uuid":"135685909","full_name":"AndrewJBateman/file-metadata","owner":"AndrewJBateman","description":":clipboard: FCC project to be able to select and upload a file via a UI","archived":false,"fork":false,"pushed_at":"2023-03-05T11:21:38.000Z","size":1190,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:30.714Z","etag":null,"topics":["cors","fcc","freecodecamp","freecodecamp-project","javascript","metadata","metadata-microservice","metadata-parser","multer","nodejs"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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":"2018-06-01T07:50:40.000Z","updated_at":"2021-06-24T13:37:51.000Z","dependencies_parsed_at":"2025-02-18T03:45:02.369Z","dependency_job_id":"e848ae6b-d7ac-4af9-87d2-b81f08fffd6f","html_url":"https://github.com/AndrewJBateman/file-metadata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/file-metadata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffile-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffile-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffile-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffile-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/file-metadata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Ffile-metadata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32315711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T21:09:39.134Z","status":"ssl_error","status_checked_at":"2026-04-26T21:09:21.240Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cors","fcc","freecodecamp","freecodecamp-project","javascript","metadata","metadata-microservice","metadata-parser","multer","nodejs"],"created_at":"2024-11-07T03:27:49.674Z","updated_at":"2026-04-26T22:31:17.423Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: File Metadata Microservice for freeCodeCamp\n\n* extracts uploaded file metadata and stores file using [multer](https://www.npmjs.com/package/multer) node.js middleware\n* This was part of the FreeCodeCamp exercises for Front End Certification\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/file-metadata?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/file-metadata?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/file-metadata?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/file-metadata?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: File Metadata Microservice for freeCodeCamp](#zap-file-metadata-microservice-for-freecodecamp)\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* [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Original instructions (User Stories) from FCC:\n\n1. I can submit a form that includes a file upload.\n2. The from file input field  has the \"name\" attribute set to \"upfile\". We rely on this in testing.\n3. When I submit something, I will receive the file name and size in bytes within the JSON response\n4. To handle the file uploading you should use the [multer](https://www.npmjs.com/package/multer) npm package.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/file.png).\n\n## :signal_strength: Technologies\n\n* [Node v14](https://nodejs.org/en/) javaScript runtime built on Chrome's V8 JavaScript engine\n* [Express v5](https://expressjs.com/) Fast, unopinionated, minimalist web framework for Node.js\n* [multer v1](https://www.npmjs.com/package/multer) node.js middleware for handling multipart/form-data, mainly used for uploading files\n* [Cors v2](https://www.npmjs.com/package/cors) node.js package for providing Connect/Express middleware that can be used to enable CORS with various options.\n\n## :floppy_disk: Setup\n\n* Run `node server.js` for a dev server. Navigate to `http://localhost:8080/`.\n* The app will not automatically reload if you change any of the source files.\n\n## :computer: Code Examples\n\n* extract from `server.js` to upload file and produce a json object with file details (or error message if it does not work)\n\n```javascript\napp.post('/api/fileanalyse', upload.single('upfile'), (req, res, next) =\u003e {\n\tconst fileSize = req.file \u0026\u0026 req.file.size;\n\tconsole.log(typeof fileSize); //should return 'number'\n\tres.json(\n\t\ttypeof fileSize == 'undefined'\n\t\t\t? { error: 'sorry, but there is a file error' }\n\t\t\t: {\n\t\t\t\t\tname: req.file.originalname,\n\t\t\t\t\ttype: req.file.mimetype,\n\t\t\t\t\tsize: req.file.size + ' bytes',\n\t\t\t  }\n\t);\n});\n```\n\n## :cool: Features\n\n* multer used to upload files - uploaded files stored in a folder named 'uploads'. If this folder does not exist then it is created.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: nothing\n\n## :clap: Inspiration\n\n* [freeCodeCamp's APIs and Microservices Projects - File Metadata Microservice](https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/file-metadata-microservice)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Ffile-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Ffile-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Ffile-metadata/lists"}