Skip to content

Commit 4c84092

Browse files
authored
Update s3_plugin.js
1 parent eb55502 commit 4c84092

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/s3_plugin.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,17 +260,11 @@ module.exports = class S3Plugin {
260260
})
261261

262262
// avoid noname folders in bucket
263-
if (Key[0] === '/') {
263+
if (Key[0] === '/')
264264
Key = Key.substr(1)
265-
}
266-
267-
// Remove Gzip from encoding if ico
268-
if (/\.ico/.test(fileName) && s3Params.ContentEncoding === 'gzip')
269-
delete s3Params.ContentEncoding
270-
271-
if (s3Params.ContentType === undefined) {
265+
266+
if (s3Params.ContentType === undefined)
272267
s3Params.ContentType = mime.getType(fileName)
273-
}
274268

275269
const Body = fs.createReadStream(file)
276270
const upload = this.client.upload(

0 commit comments

Comments
 (0)