Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render: function (res) {
if (this.value && this.value.url) {
var thumbnail_url = cloudinary.image(
this.value.public_id, {
format: 'png',
width: 150,
height: 110,
crop: 'fill',
alt: this.value.original_name,
title: this.value.original_name
}
);
res.write(util.format('<a href="%s">%s</a>\n', this.value.url, thumbnail_url));
res.write(util.format('<input value="false" name="%s_clear" type="checkbox">\nClear\n', this.name));
}
res.write(util.format('<input value="%s" name="%s" type="hidden">\n', this.name, encodeJSONHTML(this.value)));
this._super(res);
},
render_attributes: function (res) {
return new Promise(function(resolve) {
if (cloudinary.image(filename, { })) {
resolve(true);
} else {
resolve(false);
}
});
}
tag: function (options) {
return exists(this) ? cloudinary.image(this.get(field.path).public_id, options) : '';
},
scale: function (width, height, options) {