mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-25 11:36:34 +08:00
增加API节点安装配置界面
This commit is contained in:
23
internal/web/actions/default/ui/download.go
Normal file
23
internal/web/actions/default/ui/download.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
)
|
||||
|
||||
// 下载指定的文本内容
|
||||
type DownloadAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *DownloadAction) Init() {
|
||||
this.Nav("", "", "")
|
||||
}
|
||||
|
||||
func (this *DownloadAction) RunGet(params struct {
|
||||
File string
|
||||
Text string
|
||||
}) {
|
||||
this.AddHeader("Content-Disposition", "attachment; filename=\""+params.File+"\";")
|
||||
this.WriteString(params.Text)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user