Commit Graph

10 Commits

Author SHA1 Message Date
Bobby Wibowo
aab62b6bfe
Updated cfpurge.js and thumbs.js
Sigh.
2019-01-31 16:49:14 +07:00
Bobby Wibowo
d5c24165cf
Updates
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.
2019-01-31 16:29:34 +07:00
Bobby Wibowo
8140ff4d71
Updates
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).
2019-01-30 02:50:45 +07:00
Bobby Wibowo
e38037e660
Updates
Updated thumbs.js script to allow purging CF's cache of succeeded files

Updated utils.purgeCloudflareCache() function accordingly
2019-01-18 10:40:15 +07:00
Bobby Wibowo
e55a04c156
Updates
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.
2019-01-06 13:27:17 +07:00
Bobby Wibowo
00cbd3e76c
Updates
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.
2018-12-19 00:41:42 +07:00
Bobby Wibowo
7587bfa408
Updates
* Updated utilsController.js: Unlink thumb of type symlink whenever generateThumbs() is called.

* Updated thumbs.js: Add stats (success/error/skipped).
2018-09-05 00:29:53 +07:00
Bobby Wibowo
29f9187e92
Updated scripts/thumbs.js
* 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.
2018-09-05 00:02:24 +07:00
Bobby Wibowo
e204187efc
Updates
* Updated README.md to include information about the thumbnails generation script.

* Added .markdownlint.json to disable 2 rules from markdownlint.
2018-08-21 06:24:50 +07:00
Bobby Wibowo
7f23734d67
Updates
* 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.
2018-05-12 21:01:14 +07:00