Commit 56ce3e27 authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

fix

parent 430c9de2
......@@ -31,10 +31,18 @@ const normalizeUploadPath = (pathname: string) => {
return pathname.replace(/^.*\/images\//, "/uploads/images/");
}
if (pathname.startsWith("images/")) {
return pathname.replace(/^images\//, "/uploads/images/");
}
if (pathname.includes("/uploads/")) {
return pathname.replace(/^.*\/uploads\//, "/uploads/");
}
if (pathname.startsWith("uploads/")) {
return pathname.replace(/^uploads\//, "/uploads/");
}
if (pathname.includes("/wp-content/uploads/")) {
return pathname.replace(/^.*\/wp-content\/uploads\//, "/uploads/");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment