umime

package
v2.29.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMIME = errors.New("invalid MIME")

Functions

func ReplaceExt

func ReplaceExt(filename string, mime *mimetype.MIME) string

ReplaceExt replaces the extension of the given filename according to the desired MIME.

func Validate

func Validate(f io.Reader, allowedTypes ...string) (*mimetype.MIME, error)

Validate checks if the given stream matches any of the given MIMEs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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