Uploading Images & Videos in Next.js with Cloudinary - Dev Hints

  Рет қаралды 9,536

Cloudinary

Cloudinary

7 ай бұрын

Set up easy image and video uploading for you or your visitors in a Next.js app using the Cloudinary Upload Widget.
Learn how to setup and configure the CldUploadWidget component including adding the ability to sign uploads for secure uploads to your Cloudinary account.
📝 Next Cloudinary CldUploadWidget Docs
next.cloudinary.dev/cldupload...
Instructor: Richard Bray (@RichardBray)
--
Cloudinary helps developers build performant experiences for the web with powerful optimization and transformation APIs.
🚀 Get started with a free account!
cld.media/nextclduploadwidget
#cloudinary #devhints #nextjs #uploadvideo #uploading #fileupload #webdevelopment

Пікірлер: 19
@eunarussia8833
@eunarussia8833 3 ай бұрын
I'd like to know how do I upload multiple images with cloudinary (using Next.js)
@colbyfayock
@colbyfayock 2 ай бұрын
if you're uploading in a node environment, here's a video that can help: kzbin.info/www/bejne/lZO3iWWCZc-DsKM otherwise, let me know how you're uploading and i can give some advice
@arditqerimi745
@arditqerimi745 Ай бұрын
I placed all secret variables in .env, also in server action I am able to console all of them, but again it says API Key undefined
@colbyfayock
@colbyfayock 13 күн бұрын
do they match the following names? NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" NEXT_PUBLIC_CLOUDINARY_API_KEY="" CLOUDINARY_API_SECRET="" API key needs to be public specifically
@user-dz3ub5pb6v
@user-dz3ub5pb6v 6 ай бұрын
index.mjs:1 Missing dependency: Signed Upload requires an API key that is what I have in the browser's devtools console when just after refreshing the page... I have created the same api route, and it even generates a signature as I see in the server console but when I am trying signed preset it says "uploading 0 assets" and doesn't end uploading at all, as in the unsigned preset case where even if something goes wrong with the preset name, it is trying at least to load that image and once it is 'uploaded' it just says something like: "there is no such preset". I tried all the same code as in the video and it works well with unsigned preset, but with the signed one, it requires an API key, and I can't find a good resource where I will see where to pass that API key. I have tried to pass it in the as a parameter, but it doesn't distinguish it, and nothing except for chatgpt says that it can be used that way. There is no source which will have the good description of how to do signed preset uploads with CldUploadWidget
@raj-dr2iy
@raj-dr2iy 5 ай бұрын
In order to sign the requests, you need to use Cloudinary API Key and Secret, so set additional environment variables: NEXT_PUBLIC_CLOUDINARY_API_KEY="" CLOUDINARY_API_SECRET=""
@colbyfayock
@colbyfayock 4 ай бұрын
@@raj-dr2iy is there anywhere i can add something to make this more clear?
@raj-dr2iy
@raj-dr2iy 4 ай бұрын
Sure! Firstly, ensure to set up a .env file with all the credentials in the project's root directory.@@colbyfayock
@maneshwar3468
@maneshwar3468 2 ай бұрын
@@raj-dr2iy Thanks for sharing.
@maneshwar3468
@maneshwar3468 2 ай бұрын
@@colbyfayock Yes, include about the environment settings in the video.
@lev1ato
@lev1ato 4 ай бұрын
I am not able to build production nextjs app with: import { v2 as cloudinary } from 'next-cloudinary'; it says: Module not found: Can't resolve 'http' and so on for all the modules Please help me
@lev1ato
@lev1ato 4 ай бұрын
export const runtime = 'edge'; Breaks it, but it is needed for deploying to production.... Please help me figure it out.
@colbyfayock
@colbyfayock 4 ай бұрын
@@lev1atohey unfortunately the Node SDK isn't supported on Edge runtime :( you would either need to use the standard runtime for the endpoints that use the Node SDK or manually write the code to hit the REST API and sign the requests. i have an example of how i've done that before here: github.com/colbyfayock/tweezer/blob/main/src/pages/api/upload.js
@mantasbeniusis9777
@mantasbeniusis9777 4 ай бұрын
You should import it from a different package. Note that it is from 'cloudinary' and not 'next-cloudinary'
@lev1ato
@lev1ato 4 ай бұрын
@@mantasbeniusis9777 yeah I made a typo above, but the example Colby gave me actually helped me solve it. I just had to make couple of changes to make it work with the Next.js App router.
@_bestbeast
@_bestbeast 6 ай бұрын
I am facing problems that I am not able to click any link aur button of upload widget
@colbyfayock
@colbyfayock 6 ай бұрын
are you using CldUploadWidget? try checking out this example that shows how to set up a button, including adding the onClick handler to open the widget: github.com/cloudinary-community/cloudinary-examples/blob/main/examples/nextjs-clduploadwidget/pages/index.js#L44
@keyzhao1775
@keyzhao1775 19 күн бұрын
only cover image not cover uploading video as title
@colbyfayock
@colbyfayock 13 күн бұрын
hey you're right in that the video doesnt specifically upload a video file but the same exact process works just the same for videos (or any other files) unless you limit it specifically to images, so it "just works"
The Story of Next.js
12:13
uidotdev
Рет қаралды 561 М.
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 114 МЛН
The Biggest Issues I've Faced Web Scraping (and how to fix them)
15:03
Run your Next.js app on Cloud Run
12:23
Google Cloud Tech
Рет қаралды 5 М.
How To Optimize Largest Contentful Paint
7:24
DebugBear
Рет қаралды 15 М.
5 Tips and Tricks To Make Your Life With Next js 14 Easier
17:11
developedbyed
Рет қаралды 35 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 638 М.
Always Check for the Hidden API when Web Scraping
11:50
John Watson Rooney
Рет қаралды 615 М.
These Coding Projects Give You An Unfair Advantage
14:39
Harkirat Singh
Рет қаралды 343 М.
Using Images in Next.js (next/image examples)
9:10
leerob
Рет қаралды 100 М.
Сколько реально стоит ПК Величайшего?
0:37
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,9 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,8 МЛН
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 19 МЛН