-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
🐞 Unable to access uploaded files while running fiber #221
Comments
By the way, I'm also using minio for storage, and its method requires providing a path to the file. C.formfile () doesn't seem to have a temporary path to the file |
I tried to re-produce your issue but it works like expected?
package main
import (
"fmt"
"github.com/gofiber/fiber"
)
func main() {
app := fiber.New()
app.Post("/", func(c *fiber.Ctx) {
if form, err := c.MultipartForm(); err == nil {
files := form.File["documents"]
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "main.go" 546 "application/octet-stream"
c.SaveFile(file, fmt.Sprintf("./copy_%s", file.Filename))
}
}
})
app.Listen(3000)
}
// curl -F [email protected] http://localhost:3000 Run:
Writing or accessing copy_main.go seems to work fine? |
Then visit : http://localhost:3000/upload/filename.extname Try uploading an image to the Static directory? @Fenny |
One second, I think I found the problem. |
This should be fixed in |
Thanks! The problem was fixed |
Fiber version/commit
1.8.2
Issue description
Unable to access static folder uploaded files before restarting fiber
Expected behavior
I upload some static files to static folder,then unable to access these files, until restart the fiber server
Steps to reproduce
Code snippet
The text was updated successfully, but these errors were encountered: