Fix URL for subfolder assets (#15126)

* Prevent duplicate rootPath for image in file-preview

* Add rootPath to file and file-image for downloading

* Revert change to v-image

* Patch rootPaths accordingly

* Fix missing file name on download
This commit is contained in:
ian
2022-08-18 02:03:29 +08:00
committed by GitHub
parent d6bfef40cc
commit 122f8cfed0
6 changed files with 15 additions and 9 deletions

View File

@@ -240,10 +240,10 @@ const confirmDelete = ref(false);
const editActive = ref(false);
const fileSrc = computed(() => {
if (item.value && item.value.modified_on) {
return getRootPath() + `assets/${props.primaryKey}?cache-buster=${item.value.modified_on}&key=system-large-contain`;
return `assets/${props.primaryKey}?cache-buster=${item.value.modified_on}&key=system-large-contain`;
}
return getRootPath() + `assets/${props.primaryKey}?key=system-large-contain`;
return `assets/${props.primaryKey}?key=system-large-contain`;
});
// These are the fields that will be prevented from showing up in the form because they'll be shown in the sidebar