Skip to content

This Node.js and Express.js microservice lets users upload a file via a web form. After submission, it responds with a JSON object containing the file's name, type, and size in bytes. It's a quick demonstration of handling file uploads and extracting essential metadata using multer.

License

Notifications You must be signed in to change notification settings

sabbas-ctrl/File-Metadata-Microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Metadata Microservice

A REST API project for uploading files and retrieving their metadata, built with Node.js, Express, and Multer.

Features

  • Upload files via a form
  • Receive file metadata: name, type, and size in bytes (JSON response)

API Endpoints

Upload a File

POST /api/fileanalyse
Form field:

  • upfile (file input, required)

Response:

{
  "name": "filename.ext",
  "type": "file/type",
  "size": 12345
}

Getting Started

Clone the repo:

git clone https://github.com/sabbas-ctrl/File-Metadata-Microservice
cd File-Metadata-Microservice

Install dependencies:

npm install

Start the server:

npm run dev

The app runs on http://localhost:3000.

Project Structure

  • index.js – Main server file
  • public/ – Static assets (CSS)
  • views/ – HTML frontend

About

This Node.js and Express.js microservice lets users upload a file via a web form. After submission, it responds with a JSON object containing the file's name, type, and size in bytes. It's a quick demonstration of handling file uploads and extracting essential metadata using multer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published