handler

package
v0.0.0-...-9f1ab1e Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(commandName string, params []string) (string, error)

func CompleteChunk

func CompleteChunk(uploadID, filename string) error

func CreateDateDir

func CreateDateDir(path string) string

func ProcessChunk

func ProcessChunk(r *http.Request) error

func RebuildFile

func RebuildFile(dir string, name string) error

func StoreChunk

func StoreChunk(chunk *Chunk) error

func Transform

func Transform(name string)

func Uplaod

func Uplaod(w http.ResponseWriter, r *http.Request)

Types

type ByChunk

type ByChunk []os.FileInfo

func (ByChunk) Len

func (a ByChunk) Len() int

func (ByChunk) Less

func (a ByChunk) Less(i, j int) bool

func (ByChunk) Swap

func (a ByChunk) Swap(i, j int)

type Chunk

type Chunk struct {
	UploadID      string // unique id for the current upload.
	ChunkNumber   int32
	TotalChunks   int32
	TotalFileSize int64 // in bytes
	Filename      string
	Data          io.Reader
	UploadDir     string
}

func ParseChunk

func ParseChunk(r *http.Request) (*Chunk, error)

Jump to

Keyboard shortcuts

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