uploader

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatExts = map[string]imaging.Format{
	".jpg":  imaging.JPEG,
	".jpeg": imaging.JPEG,
	".png":  imaging.PNG,
	".gif":  imaging.GIF,
	".tif":  imaging.TIFF,
	".tiff": imaging.TIFF,
	".bmp":  imaging.BMP,
}

Functions

This section is empty.

Types

type UploaderService

type UploaderService struct {
	// contains filtered or unexported fields
}

UploaderService user service

func NewUploaderService

func NewUploaderService(serviceConfig *service_config.ServiceConfig) *UploaderService

NewUploaderService new upload service

func (*UploaderService) AvatarThumbFile

func (us *UploaderService) AvatarThumbFile(ctx *gin.Context, uploadPath, fileName string, size int) (
	avatarfile []byte, err error)

func (*UploaderService) UploadAvatarFile

func (us *UploaderService) UploadAvatarFile(ctx *gin.Context, file *multipart.FileHeader, fileExt string) (
	url string, err error)

func (*UploaderService) UploadPostFile

func (us *UploaderService) UploadPostFile(ctx *gin.Context, file *multipart.FileHeader, fileExt string) (
	url string, err error)

Jump to

Keyboard shortcuts

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