file

package
v0.0.0-...-19a598b Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Images string
	Server http.Handler
}

func NewHandler

func NewHandler(images string) (*Handler, error)

NewHandler returns a handler with operations for file storage.

func (*Handler) ProfilePictures

func (h *Handler) ProfilePictures() string

func (*Handler) StoreProfilePicture

func (h *Handler) StoreProfilePicture(tempFile multipart.File, filename string) (string, error)

StoreProfilePicture stores the file and returns the relative path. Directories are created as required. Files are named using generated UUIDs.

Jump to

Keyboard shortcuts

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