imager

package
v4.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: AGPL-3.0, AGPL-3.0-or-later Imports: 21 Imported by: 0

Documentation

Overview

Package imager handles image, video, etc. upload requests and processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogError

func LogError(w http.ResponseWriter, r *http.Request, code int, err error)

LogError send the client file upload errors and logs them server-side

func NewImageUpload

func NewImageUpload(w http.ResponseWriter, r *http.Request)

NewImageUpload handles the clients' image (or other file) upload request

func ParseUpload

func ParseUpload(req *http.Request) (int, string, error)

ParseUpload parses the upload form. Separate function for cleaner error handling and reusability. Returns the HTTP status code of the response and an error, if any.

func UploadImageHash

func UploadImageHash(w http.ResponseWriter, req *http.Request)

UploadImageHash attempts to skip image upload, if the file has already been thumbnailed and is stored on the server. The client sends and SHA1 hash of the file it wants to upload. The server looks up, if such a file is thumbnailed. If yes, generates and sends a new image allocation token to the client.

Types

This section is empty.

Directories

Path Synopsis
Package assets manages imager file asset allocation and deallocation
Package assets manages imager file asset allocation and deallocation

Jump to

Keyboard shortcuts

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