Skip to content

multipart: allow FormFile field name to differ from filename - #73

Open
team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:multipart-file-field-name
Open

team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:multipart-file-field-name

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #63

CreateFormFile used FormFile.Name for both the form field name and the filename, so a part could not be name="file"; filename="a.txt".

Add optional FormFile.FieldName. When set, it is the Content-Disposition name; Name remains the filename. Empty FieldName keeps the previous behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

While using mutlipart form-data I am not able to set fieldName diff from fileName

1 participant