Skip to content

multipart.Writer.CreateFormFile should accept content type as a parameter #1977

@gopherbot

Description

@gopherbot

by t.manki:

Hi,

Thanks for adding a multipart writer.  When a file is added to the form, content type of
the file is now hard-coded as octet stream (see
http://goneat.org/src/pkg/mime/multipart/writer.go#L97).  It's crucial that callers have
control over the content type.  Without setting the correct content type, Flickr API
rejects the content, for example.

Thanks.

Kannan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions