S3 icon indicating copy to clipboard operation
S3 copied to clipboard

Convert blob to file.

Open aviavia opened this issue 8 years ago • 3 comments

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);
                    }
             });
        });

aviavia avatar Jan 18 '17 12:01 aviavia

Any idea anyone?

aviavia avatar Jan 24 '17 07:01 aviavia

Hi! Did you solve this issue? I want to save canvas image to S3 bucket too.

ViacheslavSamsonov avatar Feb 02 '17 19:02 ViacheslavSamsonov

No...

aviavia avatar Mar 23 '17 06:03 aviavia