function waitForjQuery(method) {
setTimeout(function() { waitForjQuery(method) }, 50);
function insertScript(src, callback) {
var script = document.createElement('script');
script.onload = callback;
script.type = 'text/javascript';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(script, s);
waitForjQuery(function() {
insertScript('//widget.cloudinary.com/global/all.js', function() {
cloudinary.applyUploadWidget(document.getElementById('upload_widget_opener'),
upload_preset: 'aoh4fpwm',
sources: [ 'local', 'url', 'camera', 'image_search',
'facebook', 'dropbox', 'google_photos' ],
google_api_key: 'AIzaSyDaQj7FO1IQtp9DSB5YNP5jjG6f_mItEQ4' ,
thumbnails: '.upload_multiple_images_holder',
button_caption: "Upload images - Open the Upload Widget"
function(error, result) { if (console && console.log) { console.log(error, result) } }