jquery - Upload Images to cloudinary directly from browser -


i'm new cloudinary , want upload multiple images directly cloudinary browser

my code is:

<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <link href="css/jquery.fileupload-noscript.css" rel="stylesheet" />     <link href="css/jquery.fileupload-ui-noscript.css" rel="stylesheet" />     <link href="css/jquery.fileupload-ui.css" rel="stylesheet" />     <link href="css/jquery.fileupload.css" rel="stylesheet" />     <title></title>     <script src='http://code.jquery.com/jquery-1.11.1.min.js' type='text/javascript'></script>     <script src='js/jquery.ui.widget.js' type='text/javascript'></script>     <script src='js/jquery.iframe-transport.js' type='text/javascript'></script>     <script src='js/jquery.fileupload.js' type='text/javascript'></script>     <script src="js/jquery.cloudinary.js"></script>     <script>         $.cloudinary.config({ cloud_name: 'imagedb-com', api_key: '634138425488393' })         $(document).ready(function () {              var timestamps = timestamp();             alert(timestamps);             var data = '{"timestamp":' + timestamps + ',"callback":"http://localhost:1174/js/newjs/cloudinary_cors.html" ,"signature":"juqvk6zyqi_kf_st_axhbg3upjy" ,"api_key":"634138425488393"}';               $('.cloudinary-fileupload').fileupload({                 disableimageresize: false,                 acceptfiletypes: /(\.|\/)(gif|jpe?g|png|bmp|ico)$/i,                 maxfilesize: 20000000, // 20mb                 formdata: data             });             $('.cloudinary-fileupload').append($.cloudinary.unsigned_upload_tag("zcudy0uz",{ cloud_name: 'imagedb-com' }));         });          function timestamp() {             var last, diff;             last = event.timestamp;             return last;         }      </script> </head> <body>     <input name="file" multiple type="file"   class="cloudinary-fileupload" id="cloud" data-cloudinary-field="image_id" />     <input type="button" value="submit" id="btn-upload"/> </body> </html> 

this gives me error bad request. {"error":{"message":"missing required parameter - file"}} please me in doing this.

can please share upload type require? seems code has mix of both signed , unsigned uploads. example, use unsigned_upload_tag method while passing timestamp, api_key , signature required signed uploads.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -