From e8bb2c5a7f6a82b93debac7f489c653c7f5d0b54 Mon Sep 17 00:00:00 2001 From: Pitu <7425261+Pitu@users.noreply.github.com> Date: Tue, 18 Sep 2018 01:49:13 -0300 Subject: [PATCH] Stupid hash was working, the size changes for some reason when uploading --- src/api/routes/files/uploadPOST.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/api/routes/files/uploadPOST.js b/src/api/routes/files/uploadPOST.js index 9769bed..580e3fd 100644 --- a/src/api/routes/files/uploadPOST.js +++ b/src/api/routes/files/uploadPOST.js @@ -10,7 +10,6 @@ const Busboy = require('busboy'); const fs = require('fs'); /* - TODO: Sometimes pics are being uploaded twice. Hash comparison not working? TODO: Strip exif data if the owner/user configured it as such TODO: If source has transparency generate a png thumbnail, otherwise a jpg. TODO: If source is a gif, generate a thumb of the first frame and play the gif on hover. @@ -103,10 +102,7 @@ class uploadPOST extends Route { if (!user) this.whereNull('userId'); // eslint-disable-line no-invalid-this else this.where('userId', user.id); // eslint-disable-line no-invalid-this }) - .where({ - hash, - size: upload.size - }) + .where({ hash }) .first(); if (exists) {