bug fixes and image scan

This commit is contained in:
Anthony Stirling
2023-04-26 13:18:24 +01:00
parent ab4aea315a
commit 4327af5133
13 changed files with 397 additions and 60 deletions

View File

@@ -136,7 +136,7 @@ document.addEventListener("DOMContentLoaded", function () {
const contentDispositionHeader = response.headers.get('Content-Disposition');
console.log(contentDispositionHeader)
if (contentDispositionHeader && contentDispositionHeader.indexOf('attachment') !== -1) {
filename = contentDispositionHeader.split('filename=')[1].replace(/"/g, '');
filename = decodeURIComponent(contentDispositionHeader.split('filename=')[1].replace(/"/g, ''));
} else {
// If the Content-Disposition header is not present or does not contain the filename, use a default filename
filename = 'download';