uploader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: Apache-2.0 Imports: 18 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,
	siteInfoService *siteinfo_common.SiteInfoCommonService) *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) (url string, err error)

UploadAvatarFile upload avatar file

func (*UploaderService) UploadBrandingFile added in v0.4.0

func (us *UploaderService) UploadBrandingFile(ctx *gin.Context) (
	url string, err error)

func (*UploaderService) UploadPostFile

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

Jump to

Keyboard shortcuts

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