New issue
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
[1.0.0-pre-release]c.Attachment download file is 0 byte #2
Comments
cheft
changed the title
[1.0.0-pre-release] Use c.Attachment("./test.txt"),the download file is 0 bytes
[1.0.0-pre-release]c.Attachment download file is 0 byte
Jan 21, 2020
Hi @cheft Attachment only sets the I think you are after SendFile, you can find more information under the Ctx documentation app.Get("/fiber/test", func(c *fiber.Ctx) {
c.SendFile("./test.txt")
}) |
sorry, I understand wrong. thx! |
koddr
added a commit
that referenced
this issue
Feb 12, 2020
Merge pull request #134 from koddr/master
the-hotmann
pushed a commit
to the-hotmann/fiber
that referenced
this issue
Feb 10, 2024
ReneWerner87
pushed a commit
that referenced
this issue
Feb 10, 2024
* Update listen.go (unform INFO prints at startip + cosmetics) BEFORE: ``` _______ __ / ____(_) /_ ___ _____ / /_ / / __ \/ _ \/ ___/ / __/ / / /_/ / __/ / /_/ /_/_.___/\___/_/ v3.0.0-beta.1 -------------------------------------------------- INFO Server started on http://127.0.0.1:8003 (bound on host 0.0.0.0 and port 8003) INFO Application name: TEST APP INFO Total handlers count: 5 INFO Prefork: Disabled INFO PID: 2342 INFO Total process count: 1 20:49:50 | 200 | 593.769µs | 123.123.123.123 | GET | / ``` AFTER: ``` _______ __ / ____(_) /_ ___ _____ / /_ / / __ \/ _ \/ ___/ / __/ / / /_/ / __/ / /_/ /_/_.___/\___/_/ v3.0.0-beta.1 -------------------------------------------------- INFO Server started on: http://127.0.0.1:8003 (bound on host 0.0.0.0 and port 8003) INFO Application name: TEST APP INFO Total handlers count: 5 INFO Prefork: Disabled INFO PID: 2342 INFO Total process count: 1 20:49:50 | 200 | 593.769µs | 123.123.123.123 | GET | / ``` * fix spacer * fix indentation for fiber version * fix linting * fix linting #2 * fix listen_test.go to match newly expected output. * fix test again --------- Co-authored-by: root <root@clicon.hosting-hotmann.de> Co-authored-by: Martin <martin@hotmann.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
c.Attachment("./test.txt")
, the download file is 0 bytes.The source file has content, but the download does not
The text was updated successfully, but these errors were encountered: