Hi Marco,
I’m confused: Are you working with two BaseX instances (one running on port 9984, one running on 10000)? Is there any chance to simplify this example and simulate the issue with a single BaseX instance? If not, could you please give me full advice what needs to be done to get it working?
I simplified your first function to…
declare %basex:inline function ssce:upload-impl($name as xs:string, $data as item()){ file:write-binary(file:temp-dir() || $name, $data) };
…and the binary file was correctly stored to disk.
Cheers Christian