Skip to content
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

proposal: mime/multipart: FieldContentDisposition helper #63346

Open
malta895 opened this issue Oct 3, 2023 · 1 comment
Open

proposal: mime/multipart: FieldContentDisposition helper #63346

malta895 opened this issue Oct 3, 2023 · 1 comment
Labels
Milestone

Comments

@malta895
Copy link

malta895 commented Oct 3, 2023

I propose the addition of an helper in the package mime/multipart, with the following signature

func FieldContentDisposition(fieldname string) string

The helper implements the escaping logic seen in the helper CreateFormField, that adds to a part the Content-Disposition header with field name only (no file name), allowing users to avoid reimplementing such logic and to have the possibility to define additional custom Mime Headers, having the Content-Disposition header still generated and escaped by Go standard library.

This proposal is related to #46771, which addresses the helper FileContentDisposition with the file name too.

@gopherbot gopherbot added this to the Proposal milestone Oct 3, 2023
@ianlancetaylor
Copy link
Contributor

CC @robtimus @neild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

3 participants