1234567891011121314151617181920 |
- package bll
- import (
- "context"
- "gxt-file-server/app/schema"
- "net/http"
- )
- type IFile interface {
- // Upload 文件上传
- Upload(ctx context.Context, r *http.Request, formKey, fileName string) (*schema.FileInfo, error)
- // Download 文件下载
- Download(ctx context.Context, filePath string) ([]byte, string, error)
- // Persistent 持久化文件
- Persistent(ctx context.Context, fileName string) error
- // ChunkUpload 文件分块上传
- ChunkUpload(ctx context.Context, req schema.FileChunkParams) (*schema.FileChunkInfo, error)
- //FileMerge 文件合并
- FileMerge(ctx context.Context, req schema.FileMergeParams) (*schema.FileInfo, error)
- }
|