Documentation ¶
Overview ¶
Package web provides helpers to work with website.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllowedFileTypes []string MaxUploadFileSize int )
Functions ¶
func DownloadStaticFile ¶
func DownloadStaticFile(w http.ResponseWriter, r *http.Request, filePath, fileName, newFileName string)
DownloadStaticFile downloads a file, and force the browser to avoid displaying it in the browser window by setting content disposition. It also allows specification of the display name.
Types ¶
type UploadedFile ¶
UploadedFile is a struct used to save information about an uploaded file.
func UploadFile ¶
UploadFile uploads one file to the specified directory with random file name. If rename is true, then original file name is use.
func UploadFiles ¶
UploadFiles uploads one or more files to the specified directory with random file names. If rename is true, then original file names are use.
Click to show internal directories.
Click to hide internal directories.