File tree Expand file tree Collapse file tree
apps/files/src/components/FileEntry Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717 <!-- Decorative image, should not be aria documented -->
1818 <img v-else-if =" previewUrl && backgroundFailed !== true"
19+ :key =" source.fileid"
1920 ref =" previewImg"
2021 alt =" "
2122 class =" files-list__row-icon-preview"
@@ -134,6 +135,17 @@ export default Vue.extend({
134135 return null
135136 }
136137
138+ if (this .source .attributes [' has-preview' ] !== true
139+ && this .source .mime !== undefined
140+ && this .source .mime !== ' application/octet-stream'
141+ ) {
142+ const previewUrl = generateUrl (' /core/mimeicon?mime={mime}' , {
143+ mime: this .source .mime ,
144+ })
145+ const url = new URL (window .location .origin + previewUrl )
146+ return url .href
147+ }
148+
137149 try {
138150 const previewUrl = this .source .attributes .previewUrl
139151 || generateUrl (' /core/preview?fileId={fileid}' , {
You can’t perform that action at this time.
0 commit comments