mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(files): do not even try to fetch a preview if èhas-preview` is false
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
22e5ebc7b2
commit
1b80db3bef
1 changed files with 12 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
<!-- Decorative image, should not be aria documented -->
|
||||
<img v-else-if="previewUrl && backgroundFailed !== true"
|
||||
:key="source.fileid"
|
||||
ref="previewImg"
|
||||
alt=""
|
||||
class="files-list__row-icon-preview"
|
||||
|
|
@ -134,6 +135,17 @@ export default Vue.extend({
|
|||
return null
|
||||
}
|
||||
|
||||
if (this.source.attributes['has-preview'] !== true
|
||||
&& this.source.mime !== undefined
|
||||
&& this.source.mime !== 'application/octet-stream'
|
||||
) {
|
||||
const previewUrl = generateUrl('/core/mimeicon?mime={mime}', {
|
||||
mime: this.source.mime,
|
||||
})
|
||||
const url = new URL(window.location.origin + previewUrl)
|
||||
return url.href
|
||||
}
|
||||
|
||||
try {
|
||||
const previewUrl = this.source.attributes.previewUrl
|
||||
|| generateUrl('/core/preview?fileId={fileid}', {
|
||||
|
|
|
|||
Loading…
Reference in a new issue