upload

package
v0.0.4-0...-d9ff495 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UriUpload = "/upload/"
)

Variables

View Source
var (
	DirUpload   string
	ImgHost     string
	ImgMaxWidth int
	DownDir     string
)

Functions

func DoUpload

func DoUpload(c *gin.Context, siteId string) string

---------

func FmtImgDir

func FmtImgDir(dir, uri string) (string, string)

func ImgResize

func ImgResize(sourceFile, outFile string, newWidth int) (int, int)

func InitWeb

func InitWeb()

func Md5Byte

func Md5Byte(bs []byte) string

func Md5File

func Md5File(fileName string) (string, error)

func WebAvatar

func WebAvatar(ctx *gin.Context, siteId string, userId int64)

func WebPublicResource

func WebPublicResource(auth *ws.Web)

func WebResDownFile

func WebResDownFile(ctx *gin.Context)

Content-Length:207081 Content-MD5:wHlX4Ow4JwWslrUuG4eA0w==

func WebResourceDetail

func WebResourceDetail(web *ws.Web)

func WebResourceInfo

func WebResourceInfo(auth *ws.Web)

func WebResourceList

func WebResourceList(web *ws.Web)

func WebUploadResource

func WebUploadResource(c *gin.Context)

Types

type UpFile

type UpFile struct {
	Exist               bool
	Uri, Path, FileName string
	Size                int64
}

func (*UpFile) Upload

func (u *UpFile) Upload(c *gin.Context, extDefault, dir, key, siteId string)

Jump to

Keyboard shortcuts

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