uploads

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploads

type Uploads struct {
	// Dir contains name of directory to control access to.
	Dir string `mapstructure:"dir"`

	// Forbid specifies list of file extensions which are forbidden for access.
	// Example: .php, .exe, .bat, .htaccess and etc.
	Forbid []string `mapstructure:"forbid"`

	// Allowed files
	Allow []string `mapstructure:"allow"`

	// internal
	Forbidden map[string]struct{} `mapstructure:"-"`
	Allowed   map[string]struct{} `mapstructure:"-"`
}

Uploads describes file location and controls access to them.

func (*Uploads) InitDefaults

func (cfg *Uploads) InitDefaults() error

InitDefaults sets missing values to their default values.

Jump to

Keyboard shortcuts

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