mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
Merge pull request #52809 from nextcloud/fix/preview-check
This commit is contained in:
commit
4635cb4b2e
3 changed files with 15 additions and 3 deletions
|
|
@ -21,6 +21,7 @@
|
|||
class="files-list__row-icon-blurhash"
|
||||
aria-hidden="true" />
|
||||
<img v-if="backgroundFailed !== true"
|
||||
:key="source.fileid"
|
||||
ref="previewImg"
|
||||
alt=""
|
||||
class="files-list__row-icon-preview"
|
||||
|
|
@ -147,6 +148,17 @@ export default defineComponent({
|
|||
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
|
||||
|| (this.isPublic
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue