upload

package
v0.0.0-...-23c13d2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomStr

func RandomStr(length int) string

随机生成符串

Types

type Field

type Field struct {
	Usdb   model.SysMember
	Field  multipart.File
	Header *multipart.FileHeader
	Size   int64
	Path   string
	Url    string
	Name   string
}

func (*Field) CheckFieldSize

func (a *Field) CheckFieldSize() bool

func (*Field) CheckImage

func (a *Field) CheckImage() error

检查图

func (*Field) CheckImageExt

func (a *Field) CheckImageExt() bool

检查图片后缀

func (*Field) CheckImageSize

func (a *Field) CheckImageSize() bool

检查图片大小

func (*Field) GetFieldName

func (a *Field) GetFieldName() string

func (*Field) GetFieldPath

func (a *Field) GetFieldPath() string

生成图片路径

func (*Field) GetName

func (a *Field) GetName() string

获取图片名称

func (*Field) GetPath

func (a *Field) GetPath() string

生成图片路径

func (*Field) GetType

func (a *Field) GetType() string

获取文件格式

func (*Field) GetUrl

func (a *Field) GetUrl() string

func (*Field) ImagesSave

func (a *Field) ImagesSave()

Jump to

Keyboard shortcuts

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