Sending binary data to Amazon S3 (Javascript)
问题 Amazon S3 interprets my binary data as non-UTF-8 and modifies it when I write to a bucket. Example using the official s3 Javascript client: var png_file = new Buffer( "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", "base64" ).toString( "binary" ); s3.putObject( { Bucket: bucket, Key: prefix + file, ContentType: "image/png;charset=utf-8", CacheControl: "public, max-age=31536000", Body: png_file // , ContentLength: png_file