We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try c.File(fileName) , it does not provide prompting name when downloading, could you provide api such as c.File(fileName, promptName string) ?
c.File(fileName, promptName string)
As echo does:
echo
// Attachment sends a response as attachment, prompting client to save the file. Attachment(file string, promptName string) error
Thank you!
The text was updated successfully, but these errors were encountered:
my workaround:
downloadName := "test"+time.Now().Format("20060102150405") + ".csv" header := c.Writer.Header() header["Content-type"] = []string{"application/octet-stream"} header["Content-Disposition"] = []string{"attachment; filename= " + downloadName} file, err := os.Open(destFile) if err != nil { c.String(http.StatusOK, "%v", err) return } defer file.Close() io.Copy(c.Writer, file)
Sorry, something went wrong.
@shawnye please see #1304 use c.DataFromReader
c.DataFromReader
No branches or pull requests
I try c.File(fileName) , it does not provide prompting name when downloading, could you provide api such as
c.File(fileName, promptName string)
?As
echo
does:Thank you!
The text was updated successfully, but these errors were encountered: