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.

Looking for guidance parsing one part of a multipart as raw data even though mime-type is tsv

See original GitHub issue

We are currently running into an issue where we have a multipart-form request in which one part is standard json mime-type and the remaining parts are text/tab-separate-values but are encoded in a unique windows encoding. If we send these through the multipart parser, it looks like they will be read as ‘utf-8’ which loses certain characters our customers need in their data. Is there any sort of handling for a case like this? Appreciate any help!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
trevtrichcommented, Feb 1, 2020

thanks for the input! i was admittedly only at the research stage trying to verify if this would work for our problem, so haven’t integrated into our system quite yet.

as i dig more i’m a little disappointed in the browser support for even setting single form “part” header properties for input type=file, so that is still going to be an issue for us even once we do hash through this decision from the parsing/server side. either way, i wanted to make sure i wasn’t crazy in thinking the specs for this are relatively grey as of right now. if i come across any good information on the topic i’ll be sure to post back here. thanks again for the input! you’re free to close for now if you’d prefer until we learn of a “blessed” way to handle this.

if anyone comes across this in the future, right now our solution is to modify the input form on submission and override the mime-type of these files as octet-stream so it won’t be parsed as utf-8 server-side. best we’ve come up with thus far.

1reaction
tunnckoCorecommented, Feb 1, 2020

I found a very recent question in SO, https://stackoverflow.com/questions/7285372/is-content-transfer-encoding-an-http-header

From there, for such things should be used Transfer-Encoding and Content-Encoding? Soo… probably we don’t support it currently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Looking for guidance parsing one part of a multipart as raw data ...
We are currently running into an issue where we have a multipart-form request in which one part is standard json mime-type and the...
Read more >
POSTMAN for Multipart/form-data - Stack Overflow
Steps to use 'Multipart/form-data ' in Postman ... At least show it the Postman Console, even if they don't fix the underlying issue....
Read more >
Multipart (multipart/form-data) creation and parsing in Apigee
This means that the json request from client needs to be transformed into 'multipart/form-data' which has one file input containing the raw pdf ......
Read more >
Multipart (Form Data) Format - MuleSoft Documentation
This example serves as input to separate DataWeave scripts. shows a raw multipart/form-data payload with a 34b21 boundary consisting of 3 parts:.
Read more >
Chapter 213. MIME Multipart DataFormat Red Hat Fuse 7.3
The unmarshal option of the mime-multipart data format will convert a MIME-Multipart message into a camel message with attachments and leaves other messages ......
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