NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
101 stars 50 forks source link

Null values in multipart forms are written as string null #218

Closed JWiseCoder closed 4 years ago

JWiseCoder commented 5 years ago

Null values passed to multipartUpload are turned into string 'null' instead of just being empty.

In other words, you get this:

----------------formboundary12345678901
Content-Disposition: form-data; name="field"

null

instead of:

----------------formboundary12345678901
Content-Disposition: form-data; name="field"

This happens on iOS, at least. I was unable to test it on Android. Looking in the source, the problem seems to be where the values are put into the form construction—with simple string concatenation.

DimitarTodorov commented 5 years ago

Hi @JWiseCoder ,

Can you please provide an example with code in which null values are used. Since in our demos the example is different. By the way, we welcome PR and contribution from community members. If you have solve the issue as you mention that it can be in the string concatenation, we will be glad to receive a PR from you.

elena-p commented 4 years ago

closing due to inactivity