minioObject, getObjErr := minioClient.GetObject(ConfigUtil.MinioBucket, key, minio.GetObjectOptions{})
if getObjErr != nil {
c.JSON(http.StatusOK, gin.H{"success": false, "info": "获取文件信息异常!" + getObjErr.Error()})
return
}
buf := bytes.NewBuffer(nil)
io.Copy(buf, minioObject)
c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; filename=%s", originName))
c.Data(http.StatusOK, "application/octet-stream", buf.Bytes())