Skip to content

Multipart uploads strips date values in the request body #432

@jcorscadden

Description

@jcorscadden

I am making a POST request using needle to upload a file to our API, I'm also including metadata with that file in the body of the request.

I've noticed that I can upload date objects using needle post requests only when I am not also uploading an object, if I do include an object (multipart upload) then the date values are stripped out of the request.

I believe this is happening because the body is stringified only if the upload reaches the last else statement in the big chain if if else statements in the start function in the needle code. I can get around this issue by just stringifying the date fields myself prior to passing the body to needle, but it would be nice if date fields were handled the same way whether or not you are performing a multipart upload

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions