feat(storage): add cos support

This commit is contained in:
neo-f
2023-03-23 13:52:44 +08:00
parent 05c133a4b5
commit a56f0b8150
13 changed files with 283 additions and 90 deletions

View File

@@ -29,6 +29,14 @@ func RegisterDocRouter(app *soda.Soda) {
SetJSONRequestBody(schema.UpdateDoc{}).
AddJSONResponse(200, schema.Doc{}).OK()
// get presigned url for tmp file upload
app.Get("/docs/upload-url", nil).
AddTags("文档管理").
SetSummary("获取临时上传文件用的预签名URL").
AddJWTSecurity(JWTRequired).
SetParameters(schema.CreateUploadURL{}).
AddJSONResponse(200, schema.UploadURL{}).OK()
app.Delete("/docs/:id", nil).
AddTags("文档管理").
SetSummary("获取文档列表").