Skip to content
Snippets Groups Projects
Commit 641c756e authored by Luke Hinds's avatar Luke Hinds
Browse files

Simple fix for hardcoded filename

parent 21b218b1
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import (
)
func addFileToRequest(request *http.Request, path string) error {
f, err := os.Open(path)
if err != nil {
return err
......@@ -18,7 +19,7 @@ func addFileToRequest(request *http.Request, path string) error {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
defer writer.Close()
part, err := writer.CreateFormFile("fileupload", "link.json")
part, err := writer.CreateFormFile("fileupload", path)
if err != nil {
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment