S3
S3 copied to clipboard
Convert blob to file.
Hi, I am trying to convert a blob to a file but s3 doesn't return error or results.
$('#frontPictureCropp').cropper('getCroppedCanvas').toBlob(function(blob) {
blob.lastModifiedDate = new Date();
blob.filename = imageId + '.png';
var file = new File([blob], imageId + '.png');
console.log(file);
S3.upload({
files: file,
path:"IL"
},function(e,r){
var imageData = [r._id, r.secure_url];
if(e)console.log(e);
if(r) {
console.log(r);
}
});
});
Any idea anyone?
Hi! Did you solve this issue? I want to save canvas image to S3 bucket too.
No...