storage

package
v0.0.0-...-d0e669d Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxAvatarSize = 2 * 1024 * 1024

MaxAvatarSize is the max avatar size which is 2MB.

View Source
const MaxBackgroundSize = 2 * 1024 * 1024

MaxBackgroundSize is the max background size which is 2MB.

View Source
const PictureKeyPrefix = "picture/"

PictureKeyPrefix is the prefix of the picture key.

Variables

This section is empty.

Functions

func UploadPictureToOSS

func UploadPictureToOSS(file multipart.File, _ *multipart.FileHeader) (string, error)

UploadPictureToOSS upload user's avatar or background image to OSS. It returns the uploaded asset URL.

func UploadPictureToS3

func UploadPictureToS3(file multipart.File, fileHeader *multipart.FileHeader) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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