question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While calling a API with content-type : "multipart/form-data", setting content disposition in header is not working

See original GitHub issue

Describe the bug

While calling a API with content-type : “mutlipart/form-data”, setting content disposition in header is not working

Version

Browser

  • Chrome

OS

  • Windows

To Reproduce

Steps to reproduce the behavior:

  1. Create a Dialog -> Trigger
  2. As part of this as for user Input as 'attachment"
  3. Send this file to input as using Access External resources -> Send HTTP Request
  4. The API that I used is of type content-type : “mutlipart/form-data”
  5. Tried options as
    1. Content-Type: multipart/form-data;boundary="boundary" - this threw error, (saying Content-Type invalid)
    1. Set header as key Content-Disposition and Value as "form-data; name="file"; filename="${dialog.attachments[0].name}"
    1. Set header as key Content-Disposition and Value as "form-data; name="file"; filename="${dialog.attachments[0].contentUrl}"
  6. This header itself is not being shown in emulator trace, I doubt if it is being set

Is there a fix for this issue

Expected behavior

Screenshots

image image

Additional context

Is there any other way of calling this kind of APIs

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dmvtechcommented, May 11, 2021

I’m investigating this now.

1reaction
tdurnfordcommented, May 10, 2021

@dmvtech can you take a look at this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

While calling a API with content-type : "multipart/form-data ...
Describe the bug While calling a API with content-type : "mutlipart/form-data", setting content disposition in header is not working Version ...
Read more >
POST request with Multipart/form-data. Content-type not ...
The weird thing is that the 'general type' of the packet indeed is multipart/form-data, but the individual item sent (key = 'name', value=...
Read more >
multipart/form-data' header doesn't handle content
Hello,. We are using API Gateway in our project and are running into a weird issue. We have a virtualized REST API allowing...
Read more >
Content-Type - HTTP - MDN Web Docs - Mozilla
In requests, (such as POST or PUT ), the client tells the server what type of data is actually sent. Header type, Representation...
Read more >
Multipart/form-data content type
Each part must contain a Content-Disposition header field where the disposition is form-data. The Content-Disposition header field must also contain an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found