When i send multipart/mixed document with 2.part application/octet-stream with value 0xFF0xFF
Into the following function, it writes into file character ?.
I am using BaseX 8.3
declare %rest:path("test") %rest:PUT("{$doc}") function nib:insert-doc($doc as item()*) as empty-sequence()
{
let $data := $doc[2]
return file:write-text("d:\abc.bin", $data)
};