bad docs and having trouble
Closed this issue · 2 comments
Using your fetch API
this url for your fetch API doesn't work:
cloudinary.image("http://upload.wikimedia.org/wikipedia/commons/0/0c/Scarlett_Johansson_Césars_2014.jpg", {type: "fetch"});
I either get a 401 or 501
I tried multiple different images -
also, I am extremely confused why none of the front-end JavaScript APIs take callbacks and also don't seem to use Promises either.
For example,
I would expect this
cloudinary.image("http://upload.wikimedia.org/wikipedia/commons/0/0c/Scarlett_Johansson_Césars_2014.jpg", {type: "fetch"}, function(err, result){
});
or
cloudinary.image("http://upload.wikimedia.org/wikipedia/commons/0/0c/Scarlett_Johansson_Césars_2014.jpg", {type: "fetch"}).then(function(){
});
but it doesn't appear that callbacks or promises are available?
thanks, sorry, just frustrated
Looking at the URL you've shared, I see the following error is returned:
X-Cld-Error:Images
of type fetch are restricted in this account`
Taking a look in your account's Security Settings, I see that the usage of 'Fetched URL' is restricted.
If you would remove this restriction, fetching will become allowed for your account.
Thanks Roee, yep that worked for us, cheers