|
|
|
@@ -192,13 +192,11 @@ func DownloadMultiModelFile(ctx *context.Context) { |
|
|
|
ctx.Resp.Header().Set("Content-Type", "application/octet-stream") |
|
|
|
allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, path) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
w := zip.NewWriter(ctx.Resp) |
|
|
|
defer w.Close() |
|
|
|
|
|
|
|
for _, oneFile := range allFile { |
|
|
|
if !oneFile.IsDir { |
|
|
|
log.Info("zip file name:" + oneFile.FileName) |
|
|
|
log.Info("zip file name:" + oneFile.FileName) |
|
|
|
fDest, err := w.Create(oneFile.FileName) |
|
|
|
if err != nil { |
|
|
|
log.Info("create zip entry error, download file failed: %s\n", err.Error()) |
|
|
|
|