Skip to content

Commit 0a8e1f4

Browse files
committed
fix: 修正粘贴板文件路径
1 parent 82201df commit 0a8e1f4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

pasteServer/hack/config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# CLI tool, only in development environment.
33
# https://goframe.org/pages/viewpage.action?pageId=3673173
44
gfcli:
5+
build:
6+
name: "pasteServer"
7+
arch: "amd64,arm64"
8+
system: "linux"
9+
path: "./bin"
510
docker:
611
build: "-a amd64 -s linux -p temp -ew"
712
tagPrefixes:

pasteServer/internal/controller/paste/paste_v1_new_paste.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (c *ControllerV1) NewPaste(ctx context.Context, req *v1.NewPasteReq) (res *
3333
}
3434

3535
if req.FileList != nil {
36-
filenames, e := req.FileList.Save("paste/content/"+pasteId+"/", false)
36+
filenames, e := req.FileList.Save("paste/content/"+pasteId+"/files/", false)
3737
if e != nil {
3838
err = gerror.NewCode(gcode.CodeInternalError, "保存附件文件失败")
3939
g.Log("保存附件文件失败: ", e.Error())

src/pages/paste/Detail.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function isImg(name) {
2020
}
2121
2222
function getAttachUrl(name) {
23-
return `/paste/content/${id.value}/${name}`;
23+
return `/pasteContent/${id.value}/files/${name}`;
2424
}
2525
2626
onMounted(() => {

0 commit comments

Comments
 (0)