JSFiddle - React, Tailwind, and code Playground
by Shirly Manor
HTML
<h1>Upload widget demo</h1>
<a href="#" id="upload_widget_opener1">Upload widget</a>
<div class="feature_thumb"/>
<script src="//widget.cloudinary.com/global/all.js">
CSS
a.cloudinary-delete { font-size: 30px; }
JavaScript
//////// Suggested ////////
var widget = cloudinary.createUploadWidget({
cloud_name: "shirly",
upload_preset: "my-preset",
cropping:'server',
theme:'white',
sources:['local','instagram','facebook','google_photos'],
show_powered_by: false,
secure:true,
client_allowed_formats: ["png","gif", "jpeg", "jpg"]
},
function(error, result) {
console.log(error, result);
}
);
document.getElementById("upload_widget_opener1").addEventListener("click", function( event ) {
widget.open();
}, false);