file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFile

func DeleteFile(filename, uploadDirectory string) error

DeleteFile removes an uploaded file from the specified directory. filename: The unique filename of the file to be deleted. uploadDirectory: The directory where the file is stored. Returns an error if the file cannot be deleted.

func UploadFile

func UploadFile(file io.Reader, handlerFilename, uploadDirectory string) (string, error)

UploadFile handles the uploading of a file. file: The file content as an io.Reader. handlerFilename: The original filename of the uploaded file. uploadDirectory: The directory where the file should be uploaded. Returns the unique filename generated for the uploaded file, or an error if the upload fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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