Re: Breaking binary files into chunk

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Breaking binary files into chunk

Grant MacKenzie
>> If I am correct in that statement, I am curious, how do people perform
>> multipart posts with binary files? Can anyone share how they do it or
>> recommend a preferred way of going about this?
>> Nick

I don't know what your setup is, but the way I would approach this is
to place OpenResty  (a curated version of nginx ) as a reverse proxy
in front of eXist.
This set up is extremely flexible and powerful.
I gave up using expath http-client, due its lack of SNI support.
I now use  a  lua module, 'lua-resty-http'  via OpenResty.
For  receiving Multi-part form request  chunked data (SAX like) yep
OpenResty has that covered  - Streaming reader and
parser for HTTP file uploading
I don't use this module  instead I use ,
which for multipart form uploads results in  (PHP style) files array,
which gives the temp location the files uploaded.
I can then can PUT these files into eXist via eXists rest or resXQ
endpoints. At the same time you can extract meta-data about the media.
and store that also as a xml file.

All my data - media is stored in eXist ,  because xQuery is the best
well thought out data query language, and eXist is good place store
but stuff like HTTPS  authentication, routing  to restXQ endpoints etc
is done via OpenResty.

Take Care
Grant Mackenzie

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Exist-open mailing list
[hidden email]