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://")) {
|
||||
var imgsrc = content.image;
|
||||
} 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);
|
||||
}
|
||||
|
@ -26,11 +26,11 @@ function loadFilePickerFolder(path, type, pickertype) {
|
||||
} else {
|
||||
var path = $(this).data("path");
|
||||
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);
|
||||
} else {
|
||||
var data = {
|
||||
path: path,
|
||||
path: "file.php?file=" + path,
|
||||
meta: {}
|
||||
};
|
||||
json = JSON.stringify(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user