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]