diff options
| author | Pitu <[email protected]> | 2018-09-18 01:49:13 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2018-09-18 01:49:13 -0300 |
| commit | e8bb2c5a7f6a82b93debac7f489c653c7f5d0b54 (patch) | |
| tree | 5523c7fa3122bd0c21a94ff1f3d1ff4baf817f11 /src/api/routes/files | |
| parent | Delete thumbs when deleting a file (diff) | |
| download | host.fuwn.me-e8bb2c5a7f6a82b93debac7f489c653c7f5d0b54.tar.xz host.fuwn.me-e8bb2c5a7f6a82b93debac7f489c653c7f5d0b54.zip | |
Stupid hash was working, the size changes for some reason when uploading
Diffstat (limited to 'src/api/routes/files')
| -rw-r--r-- | src/api/routes/files/uploadPOST.js | 6 |
1 files changed, 1 insertions, 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) { |