Feat: put / get file in qiniu policy

This commit is contained in:
HFO4
2020-01-15 16:03:23 +08:00
parent 7fbbcefc57
commit 90f82100cf
8 changed files with 158 additions and 92 deletions

View File

@@ -112,7 +112,10 @@ func (fs *FileSystem) doCompress(ctx context.Context, file *model.File, folder *
}
// 获取文件内容
fileToZip, err := fs.Handler.Get(ctx, file.SourceName)
fileToZip, err := fs.Handler.Get(
context.WithValue(ctx, fsctx.FileModelCtx, *file),
file.SourceName,
)
if err != nil {
util.Log().Debug("Open%s%s", file.Name, err)
return