qiniu

package
v0.0.0-...-78a6345 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMimeTypeNotAllowed = errors.New("mime-type not to allowed to upload")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Ak              string   `yaml:"ak" json:"ak"`
	Sk              string   `yaml:"sk" json:"sk"`
	Bucket          string   `yaml:"bucket" json:"bucket"`
	Domain          string   `yaml:"domain" json:"domain"`
	AllowExtensions []string `yaml:"allow_extensions" json:"allow_extensions"`
	Zone            string   `yaml:"zone" json:"zone"`
	Https           bool     `yaml:"https" json:"https"`
	EnableCdnUpload bool     `yaml:"enable_cdn_upload" json:"enable_cdn_upload"`
}

type Uploader

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

func (*Uploader) Init

func (u *Uploader) Init(b []byte) error

func (*Uploader) UploadHTTP

func (u *Uploader) UploadHTTP(mh *multipart.FileHeader) (*fs.FileInfo, error)

func (*Uploader) UploadLocal

func (u *Uploader) UploadLocal(dst string) (*fs.FileInfo, error)

Jump to

Keyboard shortcuts

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