Skip to content

tanmay1978/FileMetadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Metadata Microservice

A full stack JavaScript application that allows users to upload files and retrieve their metadata.

Features

  • Upload files through a web interface
  • Get file metadata including name, type, and size
  • RESTful API endpoint for file analysis
  • CORS enabled for cross-origin requests

Technologies Used

  • Backend: Node.js, Express.js
  • File Upload: Multer
  • Frontend: HTML, CSS, JavaScript (Vanilla)

Installation

  1. Clone or download the project files
  2. Navigate to the project directory
  3. Install dependencies:
    npm install
    

Usage

  1. Start the server:

    npm start
    

    Or for development with auto-restart:

    npm run dev
    
  2. Open your browser and go to http://localhost:3000

  3. Select a file and click "Upload" to see its metadata

API Endpoint

POST /api/fileanalyse

Upload a file and get its metadata.

Request:

  • Method: POST
  • Content-Type: multipart/form-data
  • Body: upfile (file)

Response:

{
  "name": "example.txt",
  "type": "text/plain",
  "size": 1234
}

Project Structure

file-metadata-microservice/
├── server.js          # Main server file
├── package.json       # Dependencies and scripts
├── public/
│   └── index.html     # Frontend interface
└── README.md          # This file

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors