mime

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types = map[string]string{}/* 1112 elements not displayed */

Types defines a map of possible mime types to be compared.

Functions

func IsValidMime

func IsValidMime(allowed []string, mime string) bool

IsValidMime

Checks a whitelist of MIME types and returns true if the file is in the whitelist.

func TypeByExtension

func TypeByExtension(extension string) string

TypeByExtension

Returns the content type based on the extension of the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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