Documentation ¶
Index ¶
- Variables
- func InitDir()
- type Chunk
- type CreateUploadResponse
- type DownloadRequest
- type File
- type FileChunk
- type FileController
- type ReassembleChunksRequest
- type ReassembleChunksResponse
- type Service
- func (u Service) CreateUpload() CreateUploadResponse
- func (u Service) Download(req DownloadRequest, header http.Header, writer io.Writer) error
- func (u Service) ReassembleChunk(req ReassembleChunksRequest) (*ReassembleChunksResponse, error)
- func (u Service) UploadChunk(req *http.Request) (*UploadChunkResponse, error)
- type UploadChunkResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Dir = "upload"
Functions ¶
Types ¶
type CreateUploadResponse ¶
type CreateUploadResponse struct {
UploadId string
}
type DownloadRequest ¶
type DownloadRequest struct {
UploadId string
}
type FileController ¶
type FileController struct {
// contains filtered or unexported fields
}
func (*FileController) Download ¶
func (c *FileController) Download(ctx *gin.Context)
func (*FileController) NewUpload ¶
func (c *FileController) NewUpload(ctx *gin.Context)
func (*FileController) Reassemble ¶
func (c *FileController) Reassemble(ctx *gin.Context)
func (*FileController) UploadChunk ¶
func (c *FileController) UploadChunk(ctx *gin.Context)
type ReassembleChunksRequest ¶
type Service ¶ added in v1.1.8
type Service struct { }
func (Service) CreateUpload ¶ added in v1.1.8
func (u Service) CreateUpload() CreateUploadResponse
func (Service) ReassembleChunk ¶ added in v1.1.8
func (u Service) ReassembleChunk(req ReassembleChunksRequest) (*ReassembleChunksResponse, error)
ReassembleChunk put chunks together
func (Service) UploadChunk ¶ added in v1.1.8
func (u Service) UploadChunk(req *http.Request) (*UploadChunkResponse, error)
UploadChunk upload each 4MB chunk of a file
type UploadChunkResponse ¶
Click to show internal directories.
Click to hide internal directories.