file_handler

package
v0.0.0-...-9e8b3cb Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPictureSize     int64 = 10485760
	MaxPictureSizeInfo       = "10M"
)

Variables

View Source
var Routers = []handler_common.GinHandleFunc{
	{
		Handler:    uploadImageHandler,
		RouterType: handler_common.RouterTypeNormal,
		Method:     "POST",
		Route:      "/upload/image",
	},
	{
		Handler:    loadImageHandler,
		RouterType: handler_common.RouterTypeNormal,
		Method:     "GET",
		Route:      "/image/:path/:filename",
	},
}

Functions

func PathExists

func PathExists(path string) (bool, error)

判断文件夹是否存在

func SetLocalFilePath

func SetLocalFilePath(path string)

func SetLocalImageFilePath

func SetLocalImageFilePath(path string)

Types

type Size

type Size interface {
	Size() int64
}

获取文件大小的接口

type Stat

type Stat interface {
	Stat() (os.FileInfo, error)
}

获取文件信息的接口

Jump to

Keyboard shortcuts

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