Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]file 类型的表单不能指定特定的 uploader 么? #649

Open
xmwilldo opened this issue Jan 22, 2025 · 0 comments
Open

Comments

@xmwilldo
Copy link

Description [describe your questions]

file 类型的表单不能指定特定的 uploader 么?因为需要上传到不同的目录,所以不想就用系统启动后指定的uploader,或者有什么别的办法可以实现上传到不用的目录?

Example code [If you have any code info]

formList.AddField("目标icon", "target_icon", db.Varchar, form.File).
FieldDisplay(func(value types.FieldModel) interface{} {
if value.Value == "" {
return ""
} else {
return fmt.Sprintf("https://%s/%s", l.svcCtx.Config.AliOSS.Domain, value.Value)
}
}).
FieldMust().
FieldDefault(fmt.Sprintf("%s/image/default.png", l.svcCtx.Config.AliOSS.Target))

Others [screenshots or other info]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant