uploads

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles uploads

func NewManager

func NewManager(db *database.Database, dataFS filesystem.FS) *Manager

NewManager creates a new upload manager

func (*Manager) ProcessUpload

func (man *Manager) ProcessUpload(uploadParameters *UploadParameters, content io.Reader) (*models.Upload, error)

ProcessUpload receives uploaded files

func (*Manager) UploadedFilesDirectory

func (man *Manager) UploadedFilesDirectory() string

UploadedFilesDirectory contains files that are not yet associated with a package upload.

func (*Manager) UploadsDirectory

func (man *Manager) UploadsDirectory() string

UploadsDirectory contains completed uploads.

type UploadParameters

type UploadParameters struct {
	Filename      string
	ForwardUpload bool
}

UploadParameters defines upload behaviour

Jump to

Keyboard shortcuts

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