Skip to content

Commit

Permalink
Extract filename base from multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodangelis authored Mar 3, 2022
2 parents fa4cfc5 + b4dba17 commit 9233bea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func New(cfg *config.Config) (*Server, error) {
continue
}
// Prepare the destination
fileName := getFileName(part.FileName(), filenames)
fileName := getFileName(filepath.Base(part.FileName()), filenames)
out, err := os.Create(filepath.Join(app.outputDir, fileName))
if err != nil {
// Output to server
Expand Down

0 comments on commit 9233bea

Please sign in to comment.