Fix local image path bugs
This commit is contained in:
parent
4fc40bb9f5
commit
86f9d0ce8d
@ -71,7 +71,7 @@ function editComplex(json) {
|
|||||||
if (content.image.startsWith("http://") || content.image.startsWith("https://")) {
|
if (content.image.startsWith("http://") || content.image.startsWith("https://")) {
|
||||||
var imgsrc = content.image;
|
var imgsrc = content.image;
|
||||||
} else {
|
} else {
|
||||||
var imgsrc = "public/file.php?file=" + content.image;
|
var imgsrc = "public/file.php?file=" + content.image.replace("file.php?file=", "");
|
||||||
}
|
}
|
||||||
$("#imageEdit #selectedimage").attr("src", imgsrc);
|
$("#imageEdit #selectedimage").attr("src", imgsrc);
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,11 @@ function loadFilePickerFolder(path, type, pickertype) {
|
|||||||
} else {
|
} else {
|
||||||
var path = $(this).data("path");
|
var path = $(this).data("path");
|
||||||
if (typeof pickertype != 'undefined' && pickertype == 'complex') {
|
if (typeof pickertype != 'undefined' && pickertype == 'complex') {
|
||||||
$("#imageEdit").data("image", path);
|
$("#imageEdit").data("image", "file.php?file=" + path);
|
||||||
$("#imageEdit #selectedimage").attr("src", "public/file.php?file=" + path);
|
$("#imageEdit #selectedimage").attr("src", "public/file.php?file=" + path);
|
||||||
} else {
|
} else {
|
||||||
var data = {
|
var data = {
|
||||||
path: path,
|
path: "file.php?file=" + path,
|
||||||
meta: {}
|
meta: {}
|
||||||
};
|
};
|
||||||
json = JSON.stringify(data);
|
json = JSON.stringify(data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user