media

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDirectory

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

AddDirectory creates a new subdirectory.

func DeleteDirectory

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

DeleteDirectory deletes a directory.

func DeleteFile

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

DeleteFile deletes a file.

func DirectoryContent

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

DirectoryContent returns all files inside a media directory.

func EditDirectory

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

EditDirectory changes the name of a directory.

func EditFile

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

EditFile renames a file.

func Media

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

Media renders the media management dialog.

func MoveFile

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

MoveFile moves a file to a different directory.

func Selection

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

Selection renders the media selection dialog.

func UploadFiles

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

UploadFiles uploads one or more files.

Types

type AddDirectoryData added in v1.3.0

type AddDirectoryData struct {
	Lang           string
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Name           string
	Selected       string
	Errors         map[string]string
}

AddDirectoryData is the data for the directory form.

type EditDirectoryData added in v1.3.0

type EditDirectoryData struct {
	Lang           string
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Name           string
	Selected       string
	Path           string
	Errors         map[string]string
}

EditDirectoryData is the data for the directory form.

type EditFileData added in v1.2.0

type EditFileData struct {
	Lang    string
	Path    string
	Name    string
	NewName string
	Errors  map[string]string
}

EditFileData is the data for the file editing form.

type File

type File struct {
	Name    string
	Path    string
	Preview string
	Size    int64
}

File is a media file.

type MoveFileData added in v1.3.0

type MoveFileData struct {
	Lang           string
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Selected       string
	Name           []string
	Errors         map[string]string
}

MoveFileData is the data for the file moving form.

type SelectionField

type SelectionField struct {
	Lang, Type, Label, Field, Language, Prefix, Value string
}

SelectionField is the data for the media selection.

Jump to

Keyboard shortcuts

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