Hi,
I can't find where I would access the other entries returned by a file upload.
What gets sent is
-----------------------------175432198730168 Content-Disposition: form-data; name="file"; filename="base.png" Content-Type: image/png
‰PNG as base64... ----------------------------
The file is in the $file map but how can I get the Content-Type for example?
%rest:POST("{$post}") %rest:form-param("file", "{$file}")
Regards,
Max
Not possible right now, sorry… Unfortunately, this part has never been specified so far. I remember that, back then, I was asking for feedback on the "simple" solution we realized. As everyone seemed to be happy, we didn’t extend it.
It would be nice if we found a way to extend the current solution without endangering backward compatibility; suggestions are welcome.
On Fri, Sep 23, 2016 at 10:07 AM, Maximilian Gärber mgaerber@arcor.de wrote:
Hi,
I can't find where I would access the other entries returned by a file upload.
What gets sent is
-----------------------------175432198730168 Content-Disposition: form-data; name="file"; filename="base.png" Content-Type: image/png
‰PNG as base64...
The file is in the $file map but how can I get the Content-Type for example?
%rest:POST("{$post}") %rest:form-param("file", "{$file}")
Regards,
Max
Hi,
as a workaround this is ok:
for $name in map:keys($file) let $content := $file($name) let $save := file:write-binary($file-path, $content)
let $local-uri := file:path-to-uri($file-path) let $mime := fetch:content-type($local-uri)
Regards,
Max
2016-09-23 10:11 GMT+02:00 Christian Grün christian.gruen@gmail.com:
Not possible right now, sorry… Unfortunately, this part has never been specified so far. I remember that, back then, I was asking for feedback on the "simple" solution we realized. As everyone seemed to be happy, we didn’t extend it.
It would be nice if we found a way to extend the current solution without endangering backward compatibility; suggestions are welcome.
On Fri, Sep 23, 2016 at 10:07 AM, Maximilian Gärber mgaerber@arcor.de wrote:
Hi,
I can't find where I would access the other entries returned by a file upload.
What gets sent is
-----------------------------175432198730168 Content-Disposition: form-data; name="file"; filename="base.png" Content-Type: image/png
‰PNG as base64...
The file is in the $file map but how can I get the Content-Type for example?
%rest:POST("{$post}") %rest:form-param("file", "{$file}")
Regards,
Max
basex-talk@mailman.uni-konstanz.de