api
Discussion List
-
Where I can find CLOUDINARY_FOLDER environment variable for my project?
I cloned one project from GitHub. In my .env.local file I have set the CLOUD_NAME, API_KEY and API_SECRET variables, and I also need to set the CLOUDINARY_FOLDER variable, but I don't know where I can find that. I am getting this error: Error:…
-
Correct configuration of cloudinary library for Next.js server side code
I'm using Next.js. I call various cloudinary API methods in several different places, but always in either API or server side methods like getStaticProps. I want to avoid having to configure the library again and again, so I've followed the Next.js example which puts initialization and config in a separate file which you…
-
How to correctly delete folders with mixed contents by prefix?
I have a bunch of test folders with both images and raw files in them which I want to delete. I have this code: let folders = await cloudinary.api.sub_folders('albums').then(resp => resp.folders) var folders_to_delete = folders.filter((f) => f.name.startsWith('test')) console.log("folders to delete: ", folders_to_delete)…
-
Search API: search by created_at with timestamp
Using the search API, I can search by created_at with this expression: "created_at>2023-09-01" But how can I include a timestamp? If I follow the format from this documentation: https://cloudinary.com/documentation/search_api#expression_fields "created_at>2023-09-01T08:00:00Z" I get the error: "Query Error (at position 25)…
-
Why are some of my uploads silently failing the first time or two?
I am using a Next.js API route (i.e. server-side function) to upload a raw file to a specific location within my Cloudinary account. Here is the code: import { v2 as cloudinary } from 'cloudinary' import { Readable } from 'stream'; export default async function uploadInfoJSON(req, res) { console.log("enter upload…
-
Why are my public ID's invalid?
I am using the JavaScript Cloudinary API to upload images and store them on the cloud. Sometimes, I will get an error for having an invalid public_id. Here is an error I recently received - { message: 'public_id ( The Unforgettable Journey10_0) is invalid', name: 'Error', http_code: 400 } Another error - { message:…
-
🤖 New AI Image Transformations and Features from Cloudinary
Hey there! As an active Cloudinary Community member, I wanted to let you know about three new Programmable Media Product Innovations and their associated walkthroughs. Our Generative AI features now let you easily remove objects, fill backgrounds and create captions in images. In addition, you can now use Cloudinary Search…