Skip to content

Commit

Permalink
Replace \\ with / before CreateFormFile
Browse files Browse the repository at this point in the history
Related to PR #5
  • Loading branch information
peterhellberg committed Sep 10, 2019
1 parent 38535c7 commit cf2225a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/upload_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"path/filepath"
"strings"
)

// UploadFiles takes a set of credentials and
Expand Down Expand Up @@ -42,7 +43,7 @@ func newUploadRequest(a Authenticator, paths []string) (*http.Request, error) {
}
defer file.Close()

part, err := writer.CreateFormFile(p, p)
part, err := writer.CreateFormFile(strings.Replace(p, "\\", "/", -1), p)

if err != nil {
return err
Expand Down

0 comments on commit cf2225a

Please sign in to comment.