chunk

package
v5.3.3-pre14 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: AGPL-3.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ChunkTempDir 保存分片文件的临时文件夹
	ChunkTempDir = filepath.Join(echo.Wd(), `data/temp/upload/chunk_temp`)

	// MergeSaveDir 分片文件合并后保存的临时文件夹
	// 避免和最终的文件保存位置相同,上传后一般需要将合并后的文件转移(os.Rename)到最终保存位置
	MergeSaveDir = filepath.Join(echo.Wd(), `data/temp/upload/chunk_merged`)

	// TempLifetime 分片临时文件过期时间
	TempLifetime = 24 * time.Hour

	// GCInterval 垃圾清理间隔时间
	GCInterval = 48 * time.Hour
)

Functions

func CleanFileByOwner added in v5.1.1

func CleanFileByOwner(ownerType string, ownerID uint64) error

func MergedFileNameGenerator added in v5.1.1

func MergedFileNameGenerator(uid interface{}) uploadClient.FileNameGenerator

func NewUploader added in v5.0.1

func NewUploader(uid interface{}, fileMaxBytes ...uint64) *uploadClient.ChunkUpload

Types

This section is empty.

Jump to

Keyboard shortcuts

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