Skip to content

Conversation

@mciasuen
Copy link

@mciasuen mciasuen commented May 9, 2022

Fixes #403

@machao
Copy link
Contributor

machao commented Oct 21, 2022

thirst for this pr


var filename = part.filename ? part.filename : part.file ? basename(part.file) : name;
if (part.buffer) return append(part.buffer, filename);
if (part.buffer) return append(part.buffer, filename, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to keep compatibility, this action may be controlled by parameters

post(
    "server/url",
    {
        file: {  buffer, filename, content_type, force_binary }
    },
    {
         multipart: true
    }
)

@tomas
Copy link
Owner

tomas commented Nov 17, 2022

Yikes, totally forgot about this. Looks a-ok!

Would you add a quick test to make sure the result we get is the expected one?

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.

Mangled file content when multipart-POSTing a file with a "text/*" content type

3 participants