static

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticController

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

func NewStaticController

func NewStaticController(conf *cfg.Config, dbConn *sqlx.DB, logger *zerolog.Logger) *StaticController

func (*StaticController) DeleteImage

func (s *StaticController) DeleteImage(c *fiber.Ctx) error

func (*StaticController) UploadImage

func (s *StaticController) UploadImage(c *fiber.Ctx) error

UploadImage takes the nickname of the uploader (always), image type: "profile", "banner", "album_cover" image type is used to construct the image path. The image is saved to the filesystem, and the path is saved to the database. This handler returns the ID of the image in the database. When a profile picture/banner upload is requested, it still needs to be confirmed by the user. INFO: currently supported arguments for imageType: "profile", "album_cover"

Jump to

Keyboard shortcuts

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