Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/captaincluster/file-metadata-microservice
The fifth, and final, project for the "Back End Development and APIs" course provided by FreeCodeCamp.
https://github.com/captaincluster/file-metadata-microservice
backend expressjs freecodecamp freecodecamp-project microservice
Last synced: 5 days ago
JSON representation
The fifth, and final, project for the "Back End Development and APIs" course provided by FreeCodeCamp.
- Host: GitHub
- URL: https://github.com/captaincluster/file-metadata-microservice
- Owner: CaptainCluster
- Created: 2024-05-09T18:07:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-09T18:48:31.000Z (6 months ago)
- Last Synced: 2024-05-09T20:46:55.368Z (6 months ago)
- Topics: backend, expressjs, freecodecamp, freecodecamp-project, microservice
- Language: HTML
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File Metadata Microservice
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
File Metadata Microservice is the 5th, and final, project for FreeCodeCamp *Back End Development and APIs* course. The program
utilizes **multer** to handle the file uploaded. The handled data will then be displayed to the user via a JSON response.🙏 Credits
---
![FreeCodeCamp](https://img.shields.io/badge/Freecodecamp-%23123.svg?&style=for-the-badge&logo=freecodecamp&logoColor=green)Everything **not** written by me has been cloned from [this GitHub repository](https://github.com/freeCodeCamp/boilerplate-project-filemetadata/).
The default README that comes with the cloned repository:
> This is the boilerplate for the File Metadata Microservice project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/file-metadata-microserviceHere is the solution I wrote for this project:
```
const multer = require('multer')
const upload = multer({ dest: "uploads/" });app.post("/api/fileanalyse", upload.single("upfile"), function(req, res)
{
try
{
res.json({
name: req.file.originalname,
type: req.file.mimetype,
size: req.file.size
});
}
catch(error)
{
console.error(error);
}
});
```