Skip to content

mostafa-khaldi/nodejs_fileupload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS file upload

a simple code to upload files to a NodeJS server

Endpoints

To upload a single file

POST /api/upload/single
The file key in the formdata file
Params dir and subdir for the main directory and subdirectory, example: dir: "user", subdir: "blog_images"

To upload multiple files

POST /api/upload/bulk
The file key in the formdata file

To delete a single file

DELETE /api/image
Params path of the file uploaded Params dir and subdir for the main directory and subdirectory, example: dir: "user", subdir: "blog_images"

Prerequisits

1- Set the property x-dataupload-key in the request header carrying the API key value
2- Set API_KEY as an environment variable in the backend with the same value as the one sent from the frontend

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published