Fixed Docker not being able to parse PDF Images (#418)
* Fixed an issue with downloading pdf files * Bumped sentry version to latest * Refactored PDF Page to image extraction to a private method. Bumped Sentry version in backend. * Fixed issue with PDFs not being parsable (image) within Docker due to libgdiplus not being installed.
This commit is contained in:
parent
b0df67cdda
commit
199ab7946c
9 changed files with 134 additions and 139 deletions
|
|
@ -96,7 +96,7 @@ export class DownloadService {
|
|||
*/
|
||||
private getFilenameFromHeader(headers: HttpHeaders, defaultName: string) {
|
||||
const tokens = (headers.get('content-disposition') || '').split(';');
|
||||
let filename = tokens[1].replace('filename=', '').replace('"', '').trim();
|
||||
let filename = tokens[1].replace('filename=', '').replace(/"/ig, '').trim();
|
||||
if (filename.startsWith('download_') || filename.startsWith('kavita_download_')) {
|
||||
const ext = filename.substring(filename.lastIndexOf('.'), filename.length);
|
||||
return defaultName + ext;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue