Unsigned Upload Not Working: "Unknown API key null"
Hello all,
I am using the vanillaJS Cloudinary upload widget in a Vue 2 app. I followed this documentation from Cloudinary to set up an unsigned upload to my cloudinary account. I've enabled unsigned uploads and created an upload preset, which is included in the config file of the upload widget (along with my cloud name).
However, when I try to upload a picture with just my cloundName and uploadPreset, I get an error message of {status: "Unknown API key null"}. If I include my APIkey, the upload works. But I thought I can do an unsigned upload without the key? What am I missing?
Below is the createWidget function, which is called by an openWidget function that is bound to a button @click:
createWidget() {
const newWidget = cloudinary.createUploadWidget(
{
cloudName: 'cloudName',
uploadPreset: 'preset',
multiple: false
},
(error, result) => {
if (!error && result && result.event === "success") {
console.log('Done! Here is the image info: ', result.info);
} else {console.log(error)}
}
)
return newWidget
},
-
Hi Colby,
Have you made sure that the upload preset that you use is an unsigned preset and not a signed one?
0
Post is closed for comments.
Comments
1 comment