Skip to content

Commit

Permalink
Make thumbnail blob optional. (mozilla-services#3282)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Nov 22, 2017
1 parent a5587bd commit 0ea3307
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addon/webextension/background/takeshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,13 @@ this.takeshot = (function() {
return auth.authHeaders().then((_headers) => {
headers = _headers;
if (blob) {
let files = [ {fieldName: "blob", filename: "screenshot.png", blob} ];
if (thumbnail) {
files.push({fieldName: "thumbnail", filename: "thumbnail.png", blob: thumbnail});
}
return createMultipart(
{shot: JSON.stringify(shot.asJson())},
[ {fieldName: "blob", filename: "screenshot.png", blob},
{fieldName: "thumbnail", filename: "thumbnail.png", blob: thumbnail} ]
files
);
}
return {
Expand Down

0 comments on commit 0ea3307

Please # to comment.