A Fullstack JavaScript application that can upload a file and retrieve its size in bytes 📁
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
routes
views
.gitignore
README.md
app.js
package-lock.json
package.json

README.md

File Metadata Microservice 📁

This service accepts a file upload with a size limit of 1000KB. Once uploaded, it will return the file size in bytes in the JSON response. Note: This service is removing the file from the server right after sending the json response because the upload files are not being managed for this project.

You can test it at https://file-metadata-micro-srvc.herokuapp.com

A Full Stack Javascript application built using Node.js, Express and Multer. An API Project for FreeCodeCamp.

Example Usage

You can drag or select a file from your computer and preview the file to upload. Once you click the upload button, the POST request is sent to the '/get-file-size/' API endpoint.

Example Output

The server responds back with the file name and file size in the JSON response.

{ 
  file_name: "Maribel.jpg", 
  file_size: "568599 bytes"
}

To Run Project Locally

Prerequisites

In order to run this project locally, you should have the following installed:

Installation & Startup

  1. Fork this repo
  2. Clone the fork
  3. Install Dependencies: $ npm install
  4. Start the Server: $ node app.js
  5. Visit http://localhost:3000/

Enjoy! 💙