file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Ctx        g.Ctx             //上下文
	File       *ghttp.UploadFile `json:"avatarfile" type:"file" dc:"选择上传文件"`
	Name       string            `json:"name"  dc:"自定义文件名称"`        // 自定义文件名称
	PathR      string            `json:"pathR"  dc:"自定义二级文件目录"`     // 自定义二级文件目录
	RandomName bool              `json:"randomName"  dc:"是否随机命名文件"` // 是否随机命名文件
	FileType   string            `json:"fileType"  dc:"文件类型"`       // 文件类型
}

文件对象

func (*FileInfo) Upload

func (f *FileInfo) Upload() (fileName string, err error)

文件上传

Jump to

Keyboard shortcuts

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