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: about 2 months 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
- Archived: true
- Created: 2024-05-09T18:07:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-09T18:48:31.000Z (about 1 year ago)
- Last Synced: 2025-02-20T12:47:04.013Z (4 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

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
---
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);
}
});
```