Skip to content

Upload a file and write the file information to the database

Notifications You must be signed in to change notification settings

ks-ieremenko/file-upload-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File upload app

The goal of the project is to upload a file and write the file information to the database. This app is used together with user-sequelize-app (https://github.com/ks-ieremenko/user-sequelize-app).

Used technologies: Express, MongoDB+Mongoose, Multer


  • Install dependencies with npm install
  • Run the express server with npm start
  • Open your browser in localhost:3001 and try the example REST endpoints.

! Uploading file and reading it's info from db is available only for admin role. !

  • Used endpoints
    • localhost:3001/read (GET) - read file info
    • localhost:3001/upload (POST) - upload a file
      • Body format: file.txt
    • localhost:3000/user?uuid=some_id (GET) - get user by id to check if uuid is admin's

About

Upload a file and write the file information to the database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published