Skip to content

dannyb101/file-metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

About

This is a simple project to upload files to a page and return a JSON object with the file name, file type and the file size.

Getting Started

To get started simply clone the repo and run the following commands:

npm run dev-start

This will start a nodemon server on port 3000.

Installing

Installation is simple, just run npm install and you are good to go.

npm install

Usage

There is just the one endpoint that you can use to upload a file /.

The endpoint accepts a POST request with a upfile field containing a file.

The response will be a JSON object with the following fields:

  • name - The name of the file
  • type - The type of the file
  • size - The size of the file in bytes

Please note that files are stored in memory on the server and are not persisted!

Acknowledgements

Special thanks to FreeCodeCamp for the challenge.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published