s3-for-google-apps-script

Upload Image (PNG file) from Google App Script to S3 Bucket

强颜欢笑 提交于 2020-06-27 16:53:08
问题 Trying to upload a png file using S3-for-Google-Apps-Script to S3 bucket: // get the image blob const imgBlob = UrlFetchApp.fetch('imageUrl').getBlob(); // init S3 instance const s3 = S3.getInstance(awsAccessKeyId, awsSecretKey); // upload the image to S3 bucket s3.putObject(bucketName, 'test.png', imgBlob, { logRequests:true }); File is uploading in S3 but not in perfect way! It's look like: If I download the image and open getting the error : "It may be damaged or use a file format that