file

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 9 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
	Files      []*multipart.FileHeader
	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)

文件上传-返回单图片结果

func (*FileInfo) Uploads added in v1.0.2

func (f *FileInfo) Uploads() (fileNames []string, err error)

多文件上传-返回多图片结果

Jump to

Keyboard shortcuts

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