« Ne travaillez jamais »
Hi Maud, Sorry for the delay, I’ll soon give you an answer on your other e-mails!
Response :
HTTP ERROR 400
Problem accessing /synopsx/files/synopsx.js. Reason:
Stopped at /resource/basex/webapp/synopsx/_restxq/files.xqm, 38/10:
[SEPM0017] Value of 'method' must be one of
(xml,xhtml,html,json,csv,text,adaptive,basex).
With 8.4, the "raw" output method has become obsolete. Your code
should work if you remove the following line:
<output:method value='raw'/>
Here is yet another solution for the synopsx.files:file() function,
which is a bit more compact:
function synopsx.files:file($file as xs:string) as item()+ {
let $path := $G:FILES || $file
return (
web:response-header(map { 'media-type': web:content-type($path) }),
file:read-binary($path)
)
};
Hope this helps, feel free to ask more questions,
Christian