From 67219575c695ed68d5b315ceca3f248253d7cf1c Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Tue, 19 Oct 2021 08:18:08 +0800 Subject: [PATCH] Add files via upload --- frontend/src/views/files/Preview.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/files/Preview.vue b/frontend/src/views/files/Preview.vue index fcb745ee..74afe9f3 100644 --- a/frontend/src/views/files/Preview.vue +++ b/frontend/src/views/files/Preview.vue @@ -313,9 +313,9 @@ export default { } else if (this.listing[j].type === "image" ) { this.routeDataP = `${baseURL}/api/raw${this.previousLink.slice(6)}?k=${key}`; } else { - this.routeDataP = ""; - } - this.rawP=`${this.routeDataP}&inline=true`; + this.routeDataP = ""; + } + this.rawP=`${this.routeDataP}&inline=true`; break; } } @@ -323,14 +323,14 @@ export default { for (let j = i + 1; j < this.listing.length; j++) { if (mediaTypes.includes(this.listing[j].type)) { this.nextLink = this.listing[j].url; - const key = Date.parse(this.listing[j].modified); - if (this.listing[j].type === "image" && !this.fullSize) { - this.routeDataN = `${baseURL}/api/preview/big${this.nextLink.slice(6)}?k=${key}`; + const key = Date.parse(this.listing[j].modified); + if (this.listing[j].type === "image" && !this.fullSize) { + this.routeDataN = `${baseURL}/api/preview/big${this.nextLink.slice(6)}?k=${key}`; } else if (this.listing[j].type === "image" ) { this.routeDataN = `${baseURL}/api/raw${this.nextLink.slice(6)}?k=${key}`; } else { - this.routeDataN = ""; - } + this.routeDataN = ""; + } this.rawN=`${this.routeDataN}&inline=true`; break; }