Bryan Fink bryan at
Sat Oct 31 15:16:17 EDT 2009

On Thu, Oct 22, 2009 at 5:09 PM, francisco treacy
<francisco.treacy at> wrote:
> Thus my question is: how do I create a Riak document/resource with
> only binary data (e.g. an image)?

Hi, Francisco.  The Erlang interface has had this capability for a
while, but as of this morning the HTTP interface can do it too.

Pull the head of the bitbucket repository, rebuild, and start Riak
with the riak_web_ip and riak_web_port settings defined (which you've
already done if you're using the JSON interface).  Then, you'll find
that /raw provides the functionality you want.  For example

   $ curl -X PUT -H "content-type: image/gif" \ \
     --data-binary @www/images/basho-landscape.gif

If that request succeeds, you'll find that GETing /raw/images/basho
now serves image/gif content.  Try pointing a browser at it!  :)

For a deeper tutorial, read riak/doc/raw-http-howto.txt


More information about the riak-users mailing list