tusclient

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(address, filename string, fileSize int64) (fileUrl string, err error)

创建文件

func DeleteFile

func DeleteFile(fileUrls ...string) error

删除Tusd文件,可变参数,每一个可以是多个文件(逗号连接)

func GetUploadInfo

func GetUploadInfo(fileUrl string) (offset, length int64, fileName string, err error)

GetUploadProgress 获取文件上传进度

func WriteFile

func WriteFile(r io.ReadSeeker, fileID string) (error, int64)

Types

type FileCreateParam

type FileCreateParam struct {
	FileName string `json:"fileName"` // 文件名称
	Length   int64  `json:"length"`   // 文件长度
	Sign     string `json:"sign"`     // 签名结果
}

type TusdController

type TusdController struct {
	common.BaseController
}

上传文件(创建)

func (*TusdController) CreateTusdFile

func (c *TusdController) CreateTusdFile()

API 创建文件 返回 tusd文件的url

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL