Documentation ¶
Index ¶
- Constants
- type JSONError
- type PepicHandler
- func (h *PepicHandler) ErrorHandler(err error, c echo.Context)
- func (h *PepicHandler) GetMeta(c echo.Context) error
- func (h *PepicHandler) GetOriginalFile(c echo.Context) error
- func (h *PepicHandler) GetResizedFile(c echo.Context) error
- func (h *PepicHandler) Index(c echo.Context) error
- func (h *PepicHandler) UploadBodyBytes(c echo.Context) error
- func (h *PepicHandler) UploadMultipart(c echo.Context) error
- type UploadResult
Constants ¶
View Source
const MinLength = 200
View Source
const SecretCodeCookieTTL = 30 * 24 * time.Hour
View Source
const SecretCodeKey = "code"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PepicHandler ¶
type PepicHandler struct { Processing processing.Processing Storage storage.Storage }
func (*PepicHandler) ErrorHandler ¶
func (h *PepicHandler) ErrorHandler(err error, c echo.Context)
func (*PepicHandler) GetMeta ¶
func (h *PepicHandler) GetMeta(c echo.Context) error
GET /meta/:name Render HTML page with uploaded images/videos and pre-defined templates for them
func (*PepicHandler) GetOriginalFile ¶
func (h *PepicHandler) GetOriginalFile(c echo.Context) error
GET /:name Returns originally stored file
func (*PepicHandler) GetResizedFile ¶
func (h *PepicHandler) GetResizedFile(c echo.Context) error
GET /:length/:name Resizes the file, stores and returns it
func (*PepicHandler) Index ¶
func (h *PepicHandler) Index(c echo.Context) error
GET / Index page Shows a form for uploading a file or entering a secret code (if configured)
func (*PepicHandler) UploadBodyBytes ¶
func (h *PepicHandler) UploadBodyBytes(c echo.Context) error
POST /upload/bytes/ Handles raw bytes upload from body
func (*PepicHandler) UploadMultipart ¶
func (h *PepicHandler) UploadMultipart(c echo.Context) error
POST /upload/multipart/ Handles multipart upload
type UploadResult ¶
Click to show internal directories.
Click to hide internal directories.