Merge pull request #52809 from nextcloud/fix/preview-check

pull/51667/merge
John Molakvoæ 5 months ago committed by GitHub
commit 4635cb4b2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      apps/files/src/components/FileEntry/FileEntryPreview.vue
  2. 4
      dist/files-main.js
  3. 2
      dist/files-main.js.map

@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save