Commit Graph

81 Commits

Author SHA1 Message Date
Bobby Wibowo
83f3b36f15
Updates
* Added "Size" column to list view of uploaded files. The size will be use 'pretty' view (kB, MB, etc).

* Added delete button to thumbs view of uploaded files.

* All instances of "file length" in public views renamed to "file name length". The latter makes more sense.
2018-03-24 23:45:51 +07:00
Bobby Wibowo
616124446f
Updates (WARNING!)
WARNING: Please turn off lolisafe before upgrading, then run "node database/migration.js" once after upgrading. Ignore all errors/warnings about duplicate column name. Afterwards make sure your config.js follows the new format in config.sample.js (specifically fileLength and generateThumbnails options).

* generateImageThumbnails and generateVideoThumbnails options in config.js is now renamed to an object named generateThumbnails, with image and video as its properties.

* fileLength option is now an object with min, max, default and userChangeable as its properties.

* User may now change their preferred file length (following the previous option, of course).

* Updated a bunch of responses messages. Mainly appending a dot to the messages.

* New APIs:
/fileLength/config to get an object of the current fileLength config (exactly what is in the config.js file).
/fileLength/change to change user's preferred file length.

* And maybe some others ...?
2018-03-24 20:52:47 +07:00
Bobby Wibowo
288795c6e3
Merge branch 'pr-retry-names' into safe.fiery.me 2018-03-18 23:59:03 +07:00
Bobby Wibowo
5be27c129d
Uses async 2018-03-18 23:32:59 +07:00
Bobby Wibowo
070f4bdafd
Updates
* Updated file name checker to use for-loop instead of do-while-loop.

* Replaced all instances of eslint-disable-line with eslint-disable-next-line.
2018-03-18 20:13:08 +07:00
Bobby Wibowo
dcb72734fe
Patch to allow "retries" when generating random name 2018-03-18 19:21:04 +07:00
Bobby Wibowo
c2b2f5b14b
Updates
* Properly merged changes from master.

* database/migration.js will now exit after migartion.

* Replaced all instances of createTableIfNotExists() into a combination of hasTable() and createTable() in db.js.
2018-03-14 13:57:09 +07:00
Bobby Wibowo
cb0295e732
Updates
* Patched delete function to continue deleting the file from the database if the physical file is missing from the expected path.

* Patched delete function to not print any error message if the file does not have any thumbnail.

* Patched uploader to check the existence of file with the same name, then try to generate a new random name if true, up to 3 times. If it still can not generate a unique random name after 3 times, it will throw an error saying that it can not allocate a name to the client.
This will be useful when shortening file name in the config file.
2018-03-13 21:51:39 +07:00
Kana
496575dea0
Whoops 2018-03-05 01:40:45 -03:00
Kana
939b5c52f7 In theory this will enable us to disable users and not break already running instances 2018-02-16 23:50:23 -03:00
Bobby Wibowo
efbaa24b30
Updates
More experimental changes to compliment the previous commit.
2018-02-07 13:32:26 +07:00
Bobby Wibowo
fb63ed50ea
Sorry.
At first I was concerned due to a particular ESLint rule called "no-undefined", but then after looking more deeply into it, I realized using typeof was unnecessary since "no-global-assign" and "no-shadow-restricted-names" were enabled and thus the previous method surely would not cause any problems.
2018-01-24 19:57:17 +07:00
Bobby Wibowo
5052cd2651
Sorry.
At first I was concerned due to a particular ESLint rule called "no-undefined", but then after looking more deeply into it, I realized using typeof was unnecessary since "no-global-assign" and "no-shadow-restricted-names" were enabled and thus the previous method surely would not cause any problems.
2018-01-24 19:53:31 +07:00
Bobby Wibowo
8598001ee3
Proper undefined check 2018-01-24 19:39:22 +07:00
Bobby Wibowo
7de25210ce
Proper undefined check 2018-01-24 19:38:32 +07:00
Bobby Wibowo
d5fcb2ee26
Updated uploadController.js
Stricter comparison.
2018-01-24 05:29:52 +07:00
Bobby Wibowo
38d77fdfbb
Fix 2018-01-24 05:29:13 +07:00
Bobby Wibowo
bcdfcd7064
Various updates
* Switched ESLint + Aqua to Standard. I'm a big fan of Standard. Updated yarn.lock file too.

* Lots of refactors to follow the rules of Standard.

* Fixed issue with uploading as a not logged in user.
2018-01-24 03:06:30 +07:00
Pitu
3c2ba4868a ugh, little mistake 2017-10-04 15:20:07 -03:00
Pitu
759943f798 whoops 2017-10-04 15:13:23 -03:00
Pitu
992b632d1a Added album downloading through front-end 2017-10-04 02:05:38 -03:00
Pitu
702075b66d ES6 rewrite 2017-10-03 21:13:38 -03:00
Kel
8427d23807 Delete thumbnails when file deletes
Tested working with a couple file types. Fixed some coding errors from earlier revision.
2017-10-01 23:33:32 -06:00
Pascal Temel
b05dac6743 cleanup 2017-09-24 05:54:13 +02:00
Pitu
ad4eeb5eaa Fixed last night's fuckup 2017-08-30 19:35:40 -03:00
Pitu
80117235f9 Added album check to uploads 2017-08-30 04:48:17 -03:00
EpikPhailure
daf8f0130c Update uploadController.js
* fixed blacklist from being bypassed due to case insensitive extension names
2017-06-22 17:35:56 -07:00
Kanacchi
e2885bd37c Made it so user doesn't need to specify blockedExtensions.
This is useful if there are people already running lolisafe and updated to latest version
2017-04-03 18:45:56 -03:00
Pitu
14cf45c168 Fixed bug that caused people to upload as anon even if running private 2017-04-03 17:29:10 -03:00
Crawl
72c38749ca Update uploadController.js 2017-03-28 07:44:31 +02:00
Onestay
ad6b7d25de added array with blocked file extensions
Added an option to add file extensions to the config which will be rejected (https://github.com/WeebDev/loli-safe/issues/19)
2017-03-27 23:07:00 +02:00
Pitu
026e0a3ef0 Derps were made, and now fixed 2017-03-18 01:36:50 -03:00
Pitu
72fb9ec938 whoops 2017-03-17 01:19:33 -03:00
Pitu
1db1b06a48 Refactor 2017-03-17 01:14:24 -03:00
Pitu
dd3b47ebc8 Added thumbnail processing while uploading 2017-03-16 21:53:29 -03:00
Pitu
7cf8b6899d Added ability to see who uploaded a file as root 2017-02-13 21:55:07 -03:00
Kanacchi
f6869ff7c5 Merge pull request #11 from PascalTemel/master
support thumbnails for .webm and .mp4 files
2017-02-07 03:20:12 -03:00
Pitu
6396d42409 Changed the way repeated files work
From now on, same file upload is restricted per user. Meaning same user cant upload the same file twice, and upon trying to do so they will get the original link instead of an updated one. This works the same way for anonymous uploads, only 1 file of the same kind will be uploaded
2017-02-07 03:18:41 -03:00
Pascal Temel
b008f77d36 Remove unused parameter 2017-02-07 01:15:39 +01:00
Pascal Temel
facf4a29fc support thumbnails for .webm and .mp4 files 2017-02-07 00:53:22 +01:00
Pitu
418f4ffe79 Stuff 2017-01-30 05:10:39 -03:00
Pitu
4a4ca06366 Forgot it was an array 2017-01-30 04:42:15 -03:00
Pitu
0258c290ff WIP 2017-01-29 22:51:54 -03:00
Pitu
b3cdc406d2 Removed blank lines 2017-01-29 04:18:46 -03:00
Pitu
3f4b879144 List and thumb view on uploads 2017-01-22 18:01:39 -03:00
Pitu
4d83ff5a28 Crawl :') 2017-01-21 17:24:20 -03:00
Pitu
cd123b4c11 Forced resolve, updated config.sample.js 2017-01-21 17:21:29 -03:00
Pitu
1b2af2282f Pagination is gucci 2017-01-21 05:17:29 -03:00
Pitu
6f06bc930b Made deleting files a promise-thingy 2017-01-21 03:57:25 -03:00
Pitu
cfba738995 Ignore file if it exists already, return its url 2017-01-21 03:49:04 -03:00