Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multer-Cloudinary-MERN-image-video-pdf-upload

NotificationsYou must be signed in to change notification settings

jaydip1235/multer-cloudinary-mern-image-video-pdf-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Many times while building full stack application,we need to upload images,videos and pdf files to database so that it can be accessed as per the choice of user. In most cases people prefer to store it in a folder and transfer that image path to database. But this causes a problem after the website is hosted on a platform like heroku.The Heroku filesystem is ephemeral - that means that any changes to the filesystem whilst the dyno is running only last until that dyno is shut down or restarted. Each dyno bootswith a clean copy of the filesystem from the most recent deploy. So the saved image inthe uploads folder goes off and so the path cannot be accessed. For this reason moving to a cloud platform is essential. It will also work fine after hosting on any platform.So for this reason, I have created a repo which shows how you can upload images,videos,pdfs to cloudinary. Cloudinary has a free trial with no credit cards required. Moreover it had enough storage in the free trial sufficient for your personal projects and hackathons(Max size of a single video should be lesser than 100mb). After uploading the video through frontend it may take few seconds(5-10) to make effect. Till that time you canshow a good pre-loader in your site!P.S = Initially you can upload only videos and images but you just need to submit a request(https://support.cloudinary.com/hc/en-us/requests/new) that you need to host pdf also for free,they will give you that privilege too within 5 minutes.Isn't that cool!
upload.mp4

P.S : I have just shown the functionality demo here so didnot took care of frontend UI

Run this app

  • Clone this repo and runnpm install
  • gotoclient directory and runnpm install as well
  • Create.env file at root level and add following variables and assign their valuesMONGO_URICLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET
  • To start the client runnpm start
  • To run the server runnodemon index

Dont forget to ⭐ the repo if you like it!

About

Multer-Cloudinary-MERN-image-video-pdf-upload

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp