8000 GitHub - kasodeep/fileupload
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kasodeep/fileupload

Repository files navigation

Image and PDF Uploading with Cloudinary:

In this application we are uploading image to the local server as well as to a cloud storage like cloudinary.

It is useful for any production application to store the images of products, users, posts on cloud rather than on personal storage.

For running this code you need to have an cloudinary account and the three .env variables in order to communicate with your cloud database.

The varibles are :

CLOUD_NAME, CLOUD_API_KEY, CLOUD_API_SECRET

You can start by cloning this repository and then provide the env variables listed above along with your MONGODB_URL in an .env file

The product model is just a sample to understand how we can store the url as string in any Schema.

Open Terminal an Run

npm i && npm start

After this make the api request from postman or any other client and provide files in the body with name image.

Link of the pdf uploaded

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0