allow file upload handler to create thumbnails for whiteboard

This commit is contained in:
ansuz 2017-10-24 18:09:38 +02:00
parent 6157c57a4b
commit ba97aa7ad2
1 changed files with 3 additions and 11 deletions

View File

@ -238,17 +238,9 @@ define([
APP.upload = function (title) {
var canvas = $canvas[0];
APP.canvas.deactivateAll().renderAll();
var finish = function (thumb) {
canvas.toBlob(function (blob) {
blob.name = title;
APP.FM.handleFile(blob, void 0, thumb);
});
};
Thumb.fromCanvas(canvas, function (e, blob) {
// carry on even if you can't get a thumbnail
if (e) { console.error(e); }
finish(blob);
canvas.toBlob(function (blob) {
blob.name = title;
APP.FM.handleFile(blob);
});
};