Loading rxq/file.xqm +10 −3 Changes for rxq/file.xqm: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -33,10 +33,17 @@ function max.file:UIFile( :) declare %rest:path("/plugins/{$filePath=.*}") function max.file:pluginUIFile( $filePath as xs:string){ function max.file:pluginUIFile($filePath as xs:string){ let $path := file:parent(file:parent(static-base-uri())) || "/plugins/" || $filePath return max.util:rawFile($path) let $mediaType := web:content-type($path) return (<rest:response> <http:response status="200"> <http:header name="content-type" value="{$mediaType}"/> <http:header name="expires" value="Tue, 22 Oct 2222 22:22:22 GMT"/> </http:response> </rest:response>, file:read-binary($path)) }; (: Loading Loading
rxq/file.xqm +10 −3 Changes for rxq/file.xqm: 10 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -33,10 +33,17 @@ function max.file:UIFile( :) declare %rest:path("/plugins/{$filePath=.*}") function max.file:pluginUIFile( $filePath as xs:string){ function max.file:pluginUIFile($filePath as xs:string){ let $path := file:parent(file:parent(static-base-uri())) || "/plugins/" || $filePath return max.util:rawFile($path) let $mediaType := web:content-type($path) return (<rest:response> <http:response status="200"> <http:header name="content-type" value="{$mediaType}"/> <http:header name="expires" value="Tue, 22 Oct 2222 22:22:22 GMT"/> </http:response> </rest:response>, file:read-binary($path)) }; (: Loading