upload

package
v0.0.0-...-6421233 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByFilename

type ByFilename []os.FileInfo

ByFilename helper struct to sort chunk files. Since chunk files are named their chunk number it is easy to sort them out.

func (ByFilename) Len

func (a ByFilename) Len() int

func (ByFilename) Less

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

func (ByFilename) Swap

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

type Service

type Service struct {
	FileService        gisvs.FileService
	UsageService       gisvs.UsageService
	ApplicationService gisvs.ApplicationService

	ChunkUploadDir    string
	FullFileDir       string
	MaxChunkSize      int64
	MaxUploadFileSize int64

	Log zerolog.Logger
}

func (*Service) ChunkUpload

func (s *Service) ChunkUpload(ctx context.Context, r *multipart.Reader) error

func (*Service) CompleteChunkUpload

func (s *Service) CompleteChunkUpload(ctx context.Context, applicationID, uploadID, filename string) (*gisvs.File, error)

func (*Service) Upload

func (s *Service) Upload(ctx context.Context, r *multipart.Reader) (*gisvs.File, error)

Jump to

Keyboard shortcuts

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