file

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// file name
	Name string
	// path
	Path    string
	NewPath string
	// img attributes
	Width  int
	Height int
	IsComp int8 // is img compress
}

file

func (*File) CompressImage

func (f *File) CompressImage(imageType string) error

图片压缩

func (*File) GetUploadFile

func (f *File) GetUploadFile(file *multipart.FileHeader) (filename string, err error)

获得文件上传路径

func (*File) SaveUploadedFile

func (f *File) SaveUploadedFile(file *multipart.FileHeader, filename string) (path string, err error)

save file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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