Hi all -
I'm trying to use BaseX to POST an image to a digital asset management system (i.e. I'm not using RESTXQ, etc, just using BaseX to compose and send the request).
The request: http:send-request( <http:request method='POST' username='{$user}' password='{$pass}' auth-method='Basic' send-authorization='true'> <http:multipart media-type='multipart/form-data'> <http:body media-type='image/tiff'/> </http:multipart> </http:request>, ' http://localhost:8080/fedora/objects/tdh:2/datastreams/OBJ?versionable=true?... ', file:read-binary('/path/to/my/image.tif') )
I'm a hapless caveman when it comes to http, and so when the binary content gets POSTed, the mime-type becomes something like 'multipart/form-data;boundary=1BEF0A57BE110FD467A'. I'm clearly missing something in the http:request but... I don't know what.
Any suggestions? It seems like I need some training wheels here, but I'm not sure which ones. :) Thank you, in advance, for your time and trouble. Best, Bridger