mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
修改上传路径
This commit is contained in:
parent
624b1ece67
commit
974d8f152a
@ -140,6 +140,7 @@ import { ElMessage } from "element-plus";
|
||||
import { useBaseStore } from "/$/base";
|
||||
import Draggable from "vuedraggable";
|
||||
import { fileSize, fileName } from "../utils";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface Item {
|
||||
url: string;
|
||||
@ -315,7 +316,9 @@ async function httpRequest(req: any, item?: any) {
|
||||
if (mode == "local") {
|
||||
data.append("key", fileName);
|
||||
} else {
|
||||
fileName = props.prefixPath ? `${props.prefixPath}/${fileName}` : fileName;
|
||||
fileName = [props.prefixPath, dayjs().format("YYYY-MM-DD"), fileName]
|
||||
.filter(Boolean)
|
||||
.join("/");
|
||||
data.append("key", fileName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user