upload

package
v0.0.0-...-0d470a8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 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 CallbackBaseForm

type CallbackBaseForm struct {
	Bucket         string `json:"bucket" form:"bucket"`
	Etag           string `json:"etag" form:"etag"`
	Filename       string `json:"filename" form:"filename"`
	Size           string `json:"size" form:"size"`
	MimeType       string `json:"mime_type" form:"mime_type"`
	Height         string `json:"height" form:"height"`
	Width          string `json:"width" form:"width"`
	Format         string `json:"format" form:"format"`
	OriginFilename string `json:"origin_filename" form:"origin_filename"`
}

type CallbackParam

type CallbackParam struct {
	CallbackUrl      string `json:"callbackUrl"`
	CallbackBody     string `json:"callbackBody"`
	CallbackBodyType string `json:"callbackBodyType"`
}

type ConfigStruct

type ConfigStruct struct {
	Expiration string          `json:"expiration"`
	Conditions [][]interface{} `json:"conditions"`
}

type EscapeError

type EscapeError string

func (EscapeError) Error

func (e EscapeError) Error() string

type InvalidHostError

type InvalidHostError string

func (InvalidHostError) Error

func (e InvalidHostError) Error() string

type Local

type Local struct {
}

type Oss

type Oss struct {
	AccessKeyId     string
	AccessKeySecret string
	Host            string
	CallbackUrl     string
	ExpireTime      int64
	MaxByte         int64
}

func (*Oss) GetPolicyToken

func (oc *Oss) GetPolicyToken(uploadDir string) string

func (*Oss) Verify

func (oc *Oss) Verify(r *http.Request) bool

type PolicyToken

type PolicyToken struct {
	AccessKeyId string `json:"accessid"`
	Host        string `json:"host"`
	Expire      int64  `json:"expire"`
	Signature   string `json:"signature"`
	Policy      string `json:"policy"`
	Directory   string `json:"dir"`
	Callback    string `json:"callback"`
}

Jump to

Keyboard shortcuts

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