Store jpg file into Tamino

Hi, please help me with this.

I have prepared a schema for non-XML storage. And the X-Query statement for storing objects into Tamino is

http://localhost/tamino/database_name/collection_name/doctype_name?_process=….

But the Tamino usage and administration manual only mentions storing XML files. How do I make X-Query statements to store jpg files?

Hello there.

The easiest way is to use either the Interactive Interface or one of the APIs…
Inserting nonXML via the Interactive Interface is done by specifying collection and doctype names in the “Into collection” field, with a separating slash.

Here is the HTTP request for a nonXML insert into collection “binary”, doctype “binary” (via the Interactive Interface):

POST /tamino/test/binary/binary HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
        application/vnd.ms-powerpoint, application/vnd.ms-excel,
        application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data; boundary=---------------------------7d37e3725039e
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost:7000
Content-Length: 67388
Connection: Keep-Alive
Cache-Control: no-cache

-----------------------------7d37e3725039e
Content-Disposition: form-data; name="_Encoding"

windows-1252
-----------------------------7d37e3725039e
Content-Disposition: form-data; name="_Process"; filename="C:\pix\gal_fx45_wall07.jpg"
Content-Type: image/pjpeg

<--- Binary data here --->

-----------------------------7d37e3725039e

Content-Disposition: form-data; name="txtLoadCollection"

binary/binary
-----------------------------7d37e3725039e--



If you can build a HTTP request like this, you should be able to insert nonXML data.

I hope that helps,
Trevor.

Thank you Trevor