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

The body of your POST request is not well-formed on iOS #83

Closed
skyliwq opened this issue Dec 22, 2020 · 3 comments · Fixed by #86
Closed

The body of your POST request is not well-formed on iOS #83

skyliwq opened this issue Dec 22, 2020 · 3 comments · Fixed by #86
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@skyliwq
Copy link

skyliwq commented Dec 22, 2020

Content-Disposition: form-data;Name="{key}"\r\n\n{value}\r\n--{boundary} sends without problems in this format, such as rn-fetch-blob. {name: 'policy', data: OSS.policy}....

my code

BlobCourier.uploadParts({
   method: 'POST',
   returnResponse: true,
   filename: imageName,
   parts: {
     policy: {
       payload: OSS.policy,
       type: 'string',
     },
     file: {
       payload: {
         absoluteFilePath: absoluteFilePath,
         mimeType: 'application/' + imageType,
       },
       type: 'file',
     },
   },
   url: OSS.host,
})
@edeckers edeckers self-assigned this Dec 22, 2020
@edeckers edeckers added this to the 1.0.4 milestone Dec 22, 2020
@edeckers
Copy link
Owner

edeckers commented Dec 22, 2020

Hey @skyliwq thank you for reaching out once more, I'll have a look at it! And I'll keep you posted on the progress.

@skyliwq
Copy link
Author

skyliwq commented Dec 22, 2020

Android normal iOS error

@edeckers
Copy link
Owner

Alright, that's helpful. And that's what I was afraid of: on iOS I build each part of the POST-body manually as that seems to be the way it is done on iOS. I'll check it out.

@edeckers edeckers added this to In progress in Planned Dec 22, 2020
@edeckers edeckers linked a pull request Dec 22, 2020 that will close this issue
4 tasks
@edeckers edeckers changed the title The body of your POST request is not well-formed The body of your POST request is not well-formed on iOS Dec 22, 2020
@edeckers edeckers added the bug Something isn't working label Dec 22, 2020
@edeckers edeckers moved this from In progress to Done in Planned Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Planned
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants