From 133ed522da7ae9e79c32ebb0b8babdf1f93a476f Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 8 Jan 2017 20:57:08 +0100 Subject: [PATCH] client/posts: fix dup finder for swf and webm fixes #110 --- client/js/controllers/post_upload_controller.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/js/controllers/post_upload_controller.js b/client/js/controllers/post_upload_controller.js index 3d8a4f8f..815ea14d 100644 --- a/client/js/controllers/post_upload_controller.js +++ b/client/js/controllers/post_upload_controller.js @@ -84,8 +84,7 @@ class PostUploadController { _uploadSinglePost(uploadable, skipDuplicates) { let reverseSearchPromise = Promise.resolve(); - if (!uploadable.lookalikesConfirmed && - ['image'].includes(uploadable.type)) { + if (!uploadable.lookalikesConfirmed) { reverseSearchPromise = Post.reverseSearch(uploadable.url || uploadable.file); } @@ -122,6 +121,9 @@ class PostUploadController { }); this._lastCancellablePromise = savePromise; return savePromise; + }).catch(error => { + error.uploadable = uploadable; + return Promise.reject(error); }); }