Feat: download file with speed limit

This commit is contained in:
HFO4
2019-11-27 13:10:19 +08:00
parent 29def02489
commit 9bb432c220
4 changed files with 39 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ func (service *FileDownloadService) Download(ctx context.Context, c *gin.Context
// 开始处理下载
ctx = context.WithValue(ctx, filesystem.GinCtx, c)
rs, err := fs.GetContent(ctx, service.Path)
rs, err := fs.GetDownloadContent(ctx, service.Path)
if err != nil {
return serializer.Err(serializer.CodeNotSet, err.Error(), err)
}