[ Agent ] [ Executor ] - fix bugs
This commit is contained in:
@@ -61,7 +61,7 @@ func main() {
|
||||
// 打印文件信息
|
||||
fmt.Printf("File Name: %s\n", file.Filename)
|
||||
fmt.Printf("File Size: %d bytes\n", file.Size)
|
||||
fmt.Printf("MIME Type: %s\n", file.Header.Get("Content-Type"))
|
||||
fmt.Printf("MIME ExecutionType: %s\n", file.Header.Get("Content-ExecutionType"))
|
||||
|
||||
// 保存文件到本地
|
||||
err = c.SaveUploadedFile(file, "./"+file.Filename)
|
||||
@@ -87,7 +87,7 @@ func main() {
|
||||
// 打印文件信息
|
||||
fmt.Printf("File Name: %s\n", file.Filename)
|
||||
fmt.Printf("File Size: %d bytes\n", file.Size)
|
||||
fmt.Printf("MIME Type: %s\n", file.Header.Get("Content-Type"))
|
||||
fmt.Printf("MIME ExecutionType: %s\n", file.Header.Get("Content-ExecutionType"))
|
||||
|
||||
// 保存文件到本地
|
||||
err = c.SaveUploadedFile(file, "./"+file.Filename)
|
||||
@@ -112,7 +112,7 @@ func main() {
|
||||
|
||||
// 设置响应头,使浏览器可以下载文件
|
||||
c.Header("Content-Disposition", "attachment; filename="+fileName)
|
||||
c.Header("Content-Type", "application/octet-stream")
|
||||
c.Header("Content-ExecutionType", "application/octet-stream")
|
||||
c.Header("Content-Transfer-Encoding", "binary")
|
||||
c.Header("Cache-Control", "no-cache")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user