upload

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 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(_ *xorm.Session, _ string, _ int64) (result []*background.Image, err error)

Search is only used to implement the interface

func (*Provider) Set

func (p *Provider) Set(s *xorm.Session, img *background.Image, project *models.Project, _ web.Auth) (err error)

Set handles setting a background through a file upload @Summary Upload a project background @Description Upload a project background. @tags project @Accept mpfd @Produce json @Param id path int true "Project 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 project." @Failure 403 {object} models.Message "File too large." @Failure 404 {object} models.Message "The project does not exist." @Failure 500 {object} models.Message "Internal error" @Router /projects/{id}/backgrounds/upload [put]

Jump to

Keyboard shortcuts

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