package
1.9.1
Repository: https://github.com/forceu/gokapi.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AddHotlink will first check if the file may use a hotlink (e.g.
CleanUp removes expired files from the config and from the filesystem if they are not referenced by other files anymore Will be called periodically or after a file has been manually deleted in the admin view.
DeleteFile is called when an admin requests deletion of a file Returns true if file was deleted or false if ID did not exist.
DuplicateFile creates a copy of an existing file with new parameters.
FileExists checks if the file exists locally or in S3.
FormatTimestamp converts a timestamp to a string in the format YYYY-MM-DD HH:MM.
GetFile gets the file by id.
GetFileByHotlink gets the file by hotlink id.
IsAbleHotlink returns true, if the file may use hotlinks (e.g.
IsExpiredFile returns true if the file is expired, either due to download count or if the provided timestamp is after the expiry timestamp.
NewFile creates a new file in the system.
NewFileFromChunk creates a new file in the system after a chunk upload has fully completed.
ServeFile subtracts a download allowance and serves the file to the browser.

# Constants

ParamDownloads is a bit to indicate that the downloads remaining shall be changed after a duplication.
ParamExpiry is a bit to indicate that the time remaining shall be changed after a duplication.
ParamName is a bit to indicate that the filename shall be changed after a duplication.
ParamPassword is a bit to indicate that the password shall be changed after a duplication.

# Variables

ErrorFileTooLarge is an error that is called when a file larger than the set maximum is uploaded.