MCPcopy
hub / github.com/gofiber/fiber / fallbackFilenameIfInvalid

Function fallbackFilenameIfInvalid

res.go:198–204  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

196}
197
198func fallbackFilenameIfInvalid(filename string) string {
199 if filename == "" || filename == "." {
200 return "download"
201 }
202
203 return filename
204}
205
206// Attachment sets the HTTP response Content-Disposition header field to attachment.
207func (r *DefaultRes) Attachment(filename ...string) {

Callers 2

AttachmentMethod · 0.85
DownloadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected