mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-08 05:45:26 +02:00
Update:Validate image URI content-type before writing image file
This commit is contained in:
@@ -3,7 +3,7 @@ const Logger = require('../Logger')
|
||||
const Path = require('path')
|
||||
const Audnexus = require('../providers/Audnexus')
|
||||
|
||||
const { downloadFile } = require('../utils/fileUtils')
|
||||
const { downloadImageFile } = require('../utils/fileUtils')
|
||||
|
||||
class AuthorFinder {
|
||||
constructor() {
|
||||
@@ -45,7 +45,7 @@ class AuthorFinder {
|
||||
const filename = authorId + '.' + ext
|
||||
const outputPath = Path.posix.join(authorDir, filename)
|
||||
|
||||
return downloadFile(url, outputPath).then(() => {
|
||||
return downloadImageFile(url, outputPath).then(() => {
|
||||
return {
|
||||
path: outputPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user