Updated Cloudfalre's cache purge utility.
It will now split URLs into chunks of 30 URLs which then will be purged
one chunk at a time.
I just found out Cloudflare's API have a limit of 30 URLs for the API.
Rewritten function to generate video thumbnails with ffmpeg.
This should be much faster than ever.
This should also solve an issue where potrait videos could have their
thumbnails be taller than 200px, since it was only forcing width to be
no larger than 200px.
Updated dashboard's styling to make sure potrait thumbnails (only matter
for video thumbnails) not going out of its container.
Updated thumbs.js (yarn thumbs) script to display elapsed time for each
operation in seconds.
Bumped v1 version string (for dashboard.css).
Added cfpurge.js to scripts directory.
This can be used to purge cache of frontend pages and uploads.
Do "node scripts/cfpurge.js --help" for usage.
Removed "randver" from package.js/scripts.
I've installed randomstring globally instead and just simply do:
randomstring n
Back then I didn't know it could be used that way.
Updated ESLint rule: curly, again.
Mainly to also enabled "consistent" rule, which enforces curly into
else/elseif blocks, if its if block requires curly.
Added support for GET requests to /api/delete route.
Its usage is /api/delete/identifier, where identifier is the filename.
Though just like its POST route, it needs token in the header.
* Updated utilsController.js: Unlink thumb of type symlink whenever generateThumbs() is called.
* Updated thumbs.js: Add stats (success/error/skipped).
* Patched getFiles() function to regard symbolic link files as nonexistent. By default failing thumbs will create symbolic links to a placeholder image. Previously the script would regard those symbolic links as existing thumbs, thus preventing the script from generating thumbs for those files.
* Added verbose option. Previously the script would print even all files that already had thumbs. Now it would only print files with missing thumbs, and enabling the option would restore the previous behavior.
* Faster upload response. Back-end will no longer wait for album timestamps to be updated before sending out response.
* Added a simple thumbnail generation script at scripts/thumbs.js. You can use this to generate thumbnails for existing files before enabling the option in config.js.
* Various other code improvements.