Skip to content

Commit d5af7b9

Browse files
authored
Merge pull request #23 from Sorunome/master
2 parents b1cad73 + d04cdc2 commit d5af7b9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ class Base {
854854
return download.getBufferAndType(avatarUrl).then(({buffer, type})=> {
855855
let opts = {
856856
name: path.basename(avatarUrl),
857-
type.split(';')[0],
857+
type,
858858
rawResponse: false
859859
};
860860
return client.uploadContent(buffer, opts);

src/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const downloadGetBufferAndType = url => {
3636
} else {
3737
type = mime.lookup(urlParse(url).pathname);
3838
}
39+
type = type.split(';')[0];
3940
return { buffer, type };
4041
});
4142
};

0 commit comments

Comments
 (0)