wip stograge
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
|
||||
export function imgurl(channel,record) {
|
||||
|
||||
if (record._file.mime === "image/svg+xml") {
|
||||
return fileurl(channel, record);
|
||||
}
|
||||
return channel.filesUrl + `/thumbs/${record._file.path}`;
|
||||
return channel.filesUrl + `/thumbs/${record._file.disk}/${record._file.path}`;
|
||||
}
|
||||
|
||||
export function fileurl(channel, record) {
|
||||
return channel.filesUrl + `/${record._file.path}`;
|
||||
return channel.filesUrl + `/${record._file.disk}/${record._file.path}`;
|
||||
}
|
||||
|
||||
export function htmlurl(channel,record, preset) {
|
||||
@@ -19,7 +18,7 @@ export function htmlurl(channel,record, preset) {
|
||||
if (record._file.width > 0) {
|
||||
let presetUrl = url;
|
||||
if (preset) {
|
||||
presetUrl = channel.filesUrl + `/templates/${preset}/${record._file.path}`;
|
||||
presetUrl = channel.filesUrl + `/templates/${preset}/${record._file.disk}/${record._file.path}`;
|
||||
}
|
||||
|
||||
html = `<img src="${presetUrl}" alt="${record._file.path}" />`
|
||||
|
||||
Reference in New Issue
Block a user