fix(webui): ignore content negotiation when downloading page

Closes: #2042
This commit is contained in:
Gauthier Roebroeck 2025-08-11 12:51:24 +08:00
parent d1475864af
commit 85a33d4661

View file

@ -906,14 +906,14 @@ export default Vue.extend({
}, 50), }, 50),
downloadCurrentPage() { downloadCurrentPage() {
new jsFileDownloader({ new jsFileDownloader({
url: this.currentPage.url, url: `${this.currentPage.url}?contentNegotiation=false`,
filename: `${this.book.name}-${this.currentPage.number}.${this.currentPage.fileName.split('.').pop()}`, filename: `${this.book.name}-${this.currentPage.number}.${this.currentPage.fileName.split('.').pop()}`,
withCredentials: true, withCredentials: true,
forceDesktopMode: true, forceDesktopMode: true,
}) })
}, },
async setCurrentPageAsPoster(type: ItemTypes) { async setCurrentPageAsPoster(type: ItemTypes) {
const imageFile = await getFileFromUrl(this.currentPage.url, 'poster', 'image/jpeg', {credentials: 'include'}) const imageFile = await getFileFromUrl(`${this.currentPage.url}?contentNegotiation=false`, 'poster', 'image/jpeg', {credentials: 'include'})
const newImageFile = await resizeImageFile(imageFile) const newImageFile = await resizeImageFile(imageFile)
switch (type) { switch (type) {
case ItemTypes.BOOK: case ItemTypes.BOOK: