-
Notifications
You must be signed in to change notification settings - Fork 128
Generate, upload, and display thumbnail of shots. #3712
Conversation
eaa7abb
to
39b6a90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a couple small notes. There's a TODO as well: is that just a leftover?
Commits should get squashed before going to master.
@@ -33,8 +34,9 @@ this.takeshot = (function() { | |||
} | |||
let convertBlobPromise = Promise.resolve(); | |||
if (buildSettings.uploadBinary && !imageBlob) { | |||
imageBlob = blobConverters.dataUrlToBlob(shot.getClip(shot.clipNames()[0]).image.url); | |||
shot.getClip(shot.clipNames()[0]).image.url = ""; | |||
let clipImage = shot.getClip(shot.clipNames()[0]).image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: semicolon
let headers; | ||
// @TODO: add thumbnail to payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a todo?
server/src/pages/shot/controller.js
Outdated
}); | ||
return fetch(req).then((resp) => { | ||
if (!resp.ok) { | ||
var errorMessage = "Error saving edited shot"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: let
(and above)
server/src/server.js
Outdated
app.put("/data/:id/:domain", upload.single('blob'), function(req, res) { | ||
app.put("/data/:id/:domain", | ||
upload.fields([{name: "blob", maxCount: 1}, {name: "thumbnail", maxCount: 1}]), | ||
function(req, res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the indentation below should be changed
`).split(/\s+/g); | ||
|
||
// Attributes that will be accepted in the constructor, but ignored/dropped | ||
AbstractShot.prototype.DEPRECATED_ATTRS = (` | ||
microdata history ogTitle createdDevice head body htmlAttrs bodyAttrs headAttrs | ||
readable hashtags comments showPage isPublic resources deviceId url | ||
fullScreenThumbnail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize we had never deprecated fullScreenThumbnail (which was from when we were doing more expansive data capturing). Anyway, good to have it gone.
39b6a90
to
c0496ab
Compare
Yep, that TODO was a leftover I missed. Squashed and merged. |
images
table and allows the thumbnails to be managed identically to the shot images.Fix #3282