mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-14 07:49:37 +00:00
Update:Validate image URI content-type before writing image file
This commit is contained in:
parent
1f8372f5e5
commit
c98fac30b6
3 changed files with 36 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue