On Sun, Jun 12, 2016 at 10:26 PM, Christian Grün christian.gruen@gmail.com wrote:
No, browser doesn't want to send file content with this mime type.
If you use the browser to send requests, it may be better to convert your data to CSV via XQuery:
csv:parse($input, map { "header": false(), "separator": "semicolon" })
I've tried it, it works. Almost fine. Now I have an issue with encoding. Seems like 'encoding' parameter was not applied
let $csv := csv:parse($csv, map{ 'separator': ';', 'header': false(), *'encoding': 'CP1251'* } )
How does your html look like, which you use for sending the request
via the browser?
<form action="/upload" method="POST" enctype="multipart/form-data"> <input type="file" name="csv"/> <button type="submit">Send</button> </form>