fname

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateUploadedImageFilename

func ValidateUploadedImageFilename(uploaded string) (base string, ext string, err error)

ValidateUploadedImageFilename validates an uploaded filename's base part and returns the base and extension. Rules: - base must match ^[a-zA-Z0-9_-]+$ - base length <= 100 - if base length < 4, it must not be in the reserved list (CON, PRN, AUX, NUL, COM, LPT)

Types

type FilenameValidationError

type FilenameValidationError struct {
	Code string
	Msg  string
}

FilenameValidationError provides a stable error code for HTTP mapping.

func (*FilenameValidationError) Error

func (e *FilenameValidationError) Error() string

Jump to

Keyboard shortcuts

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