Compare commits

..

6 Commits

Author SHA1 Message Date
Ns2Kracy
2adb795896 Update to 0.4.13 (#2004) 2024-09-18 15:53:41 +08:00
Ns2Kracy
8b251dc407 fix: get file content twice (#2000) 2024-09-14 23:21:03 +08:00
CorrectRoad
e4bf67dad5 chore: bump casaos version (#1999)
Signed-off-by: CorrectRoad <a778917369@gmail.com>
2024-09-14 11:37:28 +08:00
CorrectRoad
e8f9d3aaf5 fix: fix GitHub Action not work (#1996) 2024-09-11 16:04:30 +08:00
CorrectRoad
bb0d9ac25c feat: add sync OpenAPI workflows (#1995) 2024-09-11 16:00:28 +08:00
link
3a835c00e3 Update constants.go (#1961)
Signed-off-by: link <a624669980@163.com>
2024-08-14 13:35:09 +08:00
4 changed files with 40 additions and 3 deletions

19
.github/sync_openapi.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Sync OpenAPI
on:
workflow_call:
inputs:
project-name:
required: true
type: string
push:
branches:
- main
jobs:
sync:
uses: IceWhaleTech/github/.github/workflows/sync_openapi.yml@main
with:
project-name: casaos
secrets:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}

19
.github/workflows/sync_openapi.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Sync OpenAPI
on:
workflow_call:
inputs:
project-name:
required: true
type: string
push:
branches:
- main
jobs:
sync:
uses: IceWhaleTech/github/.github/workflows/sync_openapi.yml@main
with:
project-name: casaos
secrets:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}

View File

@@ -2,7 +2,7 @@ package common
const (
SERVICENAME = "casaos"
VERSION = "0.4.10"
VERSION = "0.4.13"
BODY = " "
RANW_NAME = "IceWhale-RemoteAccess"
)

View File

@@ -257,7 +257,6 @@ func GetDownloadSingleFile(ctx echo.Context) error {
ctx.Request().Header.Add("Content-Length", strconv.FormatInt(node.Size(), 10))
}
http.ServeContent(ctx.Response().Writer, ctx.Request(), fileName, node.ModTime(), fi)
// http.ServeFile(c.Writer, ctx.Request(), filePath)
defer fi.Close()
fileTmp, err := os.Open(filePath)
if err != nil {
@@ -268,7 +267,7 @@ func GetDownloadSingleFile(ctx echo.Context) error {
}
defer fileTmp.Close()
return ctx.File(filePath)
return nil
}
// @Summary 获取目录列表