mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 15:21:33 +00:00
Updates
Removed .bmp from list of allowed image extensions for thumbs gen Sharp doesn't support BMP format Increased seek timestamp for video thumbs gen from 1% to 20%
This commit is contained in:
parent
209f5429cd
commit
8482049584
@ -13,7 +13,7 @@ const thumbsDir = path.join(uploadsDir, 'thumbs')
|
|||||||
const thumbUnavailable = path.join(__dirname, '../public/images/unavailable.png')
|
const thumbUnavailable = path.join(__dirname, '../public/images/unavailable.png')
|
||||||
const cloudflareAuth = config.cloudflare.apiKey && config.cloudflare.email && config.cloudflare.zoneId
|
const cloudflareAuth = config.cloudflare.apiKey && config.cloudflare.email && config.cloudflare.zoneId
|
||||||
|
|
||||||
utilsController.imageExtensions = ['.webp', '.jpg', '.jpeg', '.bmp', '.gif', '.png', '.tiff', '.tif', '.svg']
|
utilsController.imageExtensions = ['.webp', '.jpg', '.jpeg', '.gif', '.png', '.tiff', '.tif', '.svg']
|
||||||
utilsController.videoExtensions = ['.webm', '.mp4', '.wmv', '.avi', '.mov', '.mkv']
|
utilsController.videoExtensions = ['.webm', '.mp4', '.wmv', '.avi', '.mov', '.mkv']
|
||||||
|
|
||||||
utilsController.mayGenerateThumb = extname => {
|
utilsController.mayGenerateThumb = extname => {
|
||||||
@ -202,7 +202,7 @@ utilsController.generateThumbs = (name, force) => {
|
|||||||
// Otherwise video extension
|
// Otherwise video extension
|
||||||
ffmpeg(path.join(__dirname, '..', config.uploads.folder, name))
|
ffmpeg(path.join(__dirname, '..', config.uploads.folder, name))
|
||||||
.thumbnail({
|
.thumbnail({
|
||||||
timestamps: ['1%'],
|
timestamps: ['20%'],
|
||||||
filename: '%b.png',
|
filename: '%b.png',
|
||||||
folder: path.join(__dirname, '..', config.uploads.folder, 'thumbs'),
|
folder: path.join(__dirname, '..', config.uploads.folder, 'thumbs'),
|
||||||
size: '200x?'
|
size: '200x?'
|
||||||
|
Loading…
Reference in New Issue
Block a user