upload

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: AGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
}

Provider represents an upload provider

func (*Provider) Search

func (p *Provider) Search(s *xorm.Session, search string, page int64) (result []*background.Image, err error)

Search is only used to implement the interface

func (*Provider) Set

func (p *Provider) Set(s *xorm.Session, image *background.Image, list *models.List, auth web.Auth) (err error)

Set handles setting a background through a file upload @Summary Upload a list background @Description Upload a list background. @tags list @Accept mpfd @Produce json @Param id path int true "List ID" @Param background formData string true "The file as single file." @Security JWTKeyAuth @Success 200 {object} models.Message "The background was set successfully." @Failure 400 {object} models.Message "File is no image." @Failure 403 {object} models.Message "No access to the list." @Failure 403 {object} models.Message "File too large." @Failure 404 {object} models.Message "The list does not exist." @Failure 500 {object} models.Message "Internal error" @Router /lists/{id}/backgrounds/upload [put]

Jump to

Keyboard shortcuts

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