|
|
|
@ -76,7 +76,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getPreviewPath(){
|
|
|
|
getPreviewPath(){
|
|
|
|
for (let extension of ["jpg", "png", "bmp"]) {
|
|
|
|
for (let extension of ["jpg", "png", "bmp"]) {
|
|
|
|
const path = `${this.baseURL}/static/previews/${this.itemDetails.fadr}+/${this.itemDetails.internal_id}.${extension}`
|
|
|
|
const path = `/static/previews/${this.itemDetails.fadr}+/${this.itemDetails.internal_id}.${extension}`
|
|
|
|
fetch(path, {method: 'HEAD'})
|
|
|
|
fetch(path, {method: 'HEAD'})
|
|
|
|
.then(resp => {
|
|
|
|
.then(resp => {
|
|
|
|
if (resp.status === 200) {
|
|
|
|
if (resp.status === 200) {
|
|
|
|
@ -86,7 +86,7 @@ export default {
|
|
|
|
.catch(e => {
|
|
|
|
.catch(e => {
|
|
|
|
// 404 are expected here, so ignore it
|
|
|
|
// 404 are expected here, so ignore it
|
|
|
|
if (e.status !== 404){
|
|
|
|
if (e.status !== 404){
|
|
|
|
//console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|