* Added new dependency: rimraf. This will be used by chunked upload support to bulk delete temporary chunk files.
* Added chunked uploads support :3
* Updated Dropzone to 5.2.0.
* More improvements to thumbnail view. Delete button will now only appear on hover. Some other details, such as file name, size and album/owner will also appear on hover. Touch devices will have all of those appear always visible by default.
* Image thumbnails will now appear on home page after successful uploads (only for WEBP, JPG, JPEG, BMP, GIF and PNG files). WEBP may not work properly in Firefox though.
* Refactored home.js to use const/let and some other stuff.
* Refactored album view. It will now display properly on mobile screen. Download Album button will also no longer be located at the top right, but right below the subtitle.
* Updated some version strings.
* And maybe some others that I can't remember.
* Better auth handling.
* Deleting a file will no longer cause the dashboard to load the very first page of uploaded files list. It will instead reload the currently viewed page.
* Updated dropzone (I guess).
* 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.
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 ...?
* 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.
* 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.
* It will now properly create "editedAt" and "zipGeneratedAt" columns into "albums" table, which will then be used for the "Download Album" feature. Previously, due to the lack of those columns, people could not download albums. Existing installation will have to do some manual patches, which I will describe further in the commit's comments.
* Thumbnail-less files will properly show the extensions in albums. Previously it would have two dots.
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.
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.
* 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.
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
Changed from XMLHttpRequest to Axiios and made every POST call to look for params or json and not pass the values as headers. Token is still a header though