Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(function (preset) {
if (!preset.settings.return_delete_token) {
return cloudinary.api.update_upload_preset(preset_name, { return_delete_token: true });
}
return undefined;
})
.catch(function (err) {
.then(function () {
return cloudinary.api.upload_preset(preset_name);
})
.then(function (preset) {