Skip to content

Commit

Permalink
actually this solution is way cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorunome committed Jul 15, 2017
1 parent f6da86d commit d04cdc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ class Base {
return download.getBufferAndType(avatarUrl).then(({buffer, type})=> {
let opts = {
name: path.basename(avatarUrl),
type: type.split(';')[0],
type,
rawResponse: false
};
return client.uploadContent(buffer, opts);
Expand Down
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const downloadGetBufferAndType = url => {
} else {
type = mime.lookup(urlParse(url).pathname);
}
type = type.split(';')[0];
return { buffer, type };
});
};
Expand Down

0 comments on commit d04cdc2

Please sign in to comment.