As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Issue while uploading File using Kinvey Backbone SDK
A
Anil Saini
started a topic
about 8 years ago
I am trying to upload a file File to Kinvey using Javascript Backbone SDK, and I am using the demo code present there in the SDK guide -
<formenctype="multipart/form-data"method="post"name="fileUpload"><inputmultipletype="file"/><inputtype="submit"value="Upload"/></form><script>var form = $('[name="fileUpload"]'); form.on('submit',function(e){ e.preventDefault();// Upload all the submitted files in parallel.var uploads =[];var fileList = form.find('[type="file"]')[0].files;for(var i =0, length = fileList.length; i < length; i +=1){var file = fileList.item(i); uploads.push(Kinvey.File.upload(file));}// Wait until all files are uploaded.var promise =Kinvey.Defer.all(uploads); promise.then(function(response){// response is an Array of file metadata as returned by Kinvey.},function(error){// One or more uploads failed.});});</script>
When hit on Upload button, although the file is getting uploaded, but the controls are always coming to the error callback and never in the success part.
Please see the attached response, for more clarification.
Anil Saini
I am trying to upload a file File to Kinvey using Javascript Backbone SDK, and I am using the demo code present there in the SDK guide -
<form enctype="multipart/form-data" method="post" name="fileUpload"> <input multiple type="file" /> <input type="submit" value="Upload" /></form><script> var form = $('[name="fileUpload"]'); form.on('submit', function(e) { e.preventDefault(); // Upload all the submitted files in parallel. var uploads = []; var fileList = form.find('[type="file"]')[0].files; for(var i = 0, length = fileList.length; i < length; i += 1) { var file = fileList.item(i); uploads.push(Kinvey.File.upload(file)); } // Wait until all files are uploaded. var promise = Kinvey.Defer.all(uploads); promise.then(function(response) { // response is an Array of file metadata as returned by Kinvey. }, function(error) { // One or more uploads failed. }); });</script>
When hit on Upload button, although the file is getting uploaded, but the controls are always coming to the error callback and never in the success part.
Please see the attached response, for more clarification.