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.
https://www.theregister.co.uk/2016/09/20/wtf_is_openresty_the_worlds_fifthmostused_web_server_thats_what/
This set up is extremely flexible and powerful.
I gave up using expath http-client, due its lack of SNI support.
https://github.com/fgeorges/expath-http-client-java/issues/5.
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
https://github.com/openresty/lua-resty-upload  - Streaming reader and
parser for HTTP file uploading
I don't use this module  instead I use
https://github.com/bungle/lua-resty-reqargs ,
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
data,
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, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open