mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
Updates
More experimental changes to compliment the previous commit.
This commit is contained in:
parent
66f3b0739d
commit
efbaa24b30
@ -117,7 +117,7 @@ albumsController.get = async (req, res, next) => {
|
||||
file.file = `${config.domain}/${file.name}`
|
||||
|
||||
const ext = path.extname(file.name).toLowerCase()
|
||||
if (utils.imageExtensions.includes(ext) || utils.videoExtensions.includes(ext)) {
|
||||
if ((config.uploads.generateImageThumbnails && utils.imageExtensions.includes(ext)) || (config.uploads.generateVideoThumbnails && utils.videoExtensions.includes(ext))) {
|
||||
file.thumb = `${config.domain}/thumbs/${file.name.slice(0, -ext.length)}.png`
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ uploadsController.processFilesForDisplay = async (req, res, files, existingFiles
|
||||
|
||||
for (let file of files) {
|
||||
let ext = path.extname(file.name).toLowerCase()
|
||||
if (utils.imageExtensions.includes(ext) || utils.videoExtensions.includes(ext)) {
|
||||
if ((config.uploads.generateImageThumbnails && utils.imageExtensions.includes(ext)) || (config.uploads.generateVideoThumbnails && utils.videoExtensions.includes(ext))) {
|
||||
file.thumb = `${basedomain}/thumbs/${file.name.slice(0, -ext.length)}.png`
|
||||
utils.generateThumbs(file)
|
||||
}
|
||||
@ -259,7 +259,7 @@ uploadsController.list = async (req, res) => {
|
||||
}
|
||||
|
||||
let ext = path.extname(file.name).toLowerCase()
|
||||
if (utils.imageExtensions.includes(ext) || utils.videoExtensions.includes(ext)) {
|
||||
if ((config.uploads.generateImageThumbnails && utils.imageExtensions.includes(ext)) || (config.uploads.generateVideoThumbnails && utils.videoExtensions.includes(ext))) {
|
||||
file.thumb = `${basedomain}/thumbs/${file.name.slice(0, -ext.length)}.png`
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ routes.get('/a/:identifier', async (req, res, next) => {
|
||||
file.file = `${basedomain}/${file.name}`
|
||||
|
||||
let ext = path.extname(file.name).toLowerCase()
|
||||
if (utils.imageExtensions.includes(ext) || utils.videoExtensions.includes(ext)) {
|
||||
if ((config.uploads.generateImageThumbnails && utils.imageExtensions.includes(ext)) || (config.uploads.generateVideoThumbnails && utils.videoExtensions.includes(ext))) {
|
||||
file.thumb = `${basedomain}/thumbs/${file.name.slice(0, -ext.length)}.png`
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user