开发者

How can I get Riak to store images or binary data?

开发者 https://www.devze.com 2022-12-18 21:52 出处:网络
Can Riak be used to store images or binary data? It seems to only be able to store JSON documents, is this a correct assumpti开发者_运维问答on?As z8000 said, Riak can store any data you like.If you\'r

Can Riak be used to store images or binary data? It seems to only be able to store JSON documents, is this a correct assumpti开发者_运维问答on?


As z8000 said, Riak can store any data you like. If you're using the Erlang interface, just set the value of the riak_object to whatever you want to store.

If you're using HTTP, point your client at the "raw" interface: http://hg.basho.com/riak/src/tip/doc/raw-http-howto.txt It allows you to store data and serve it with whatever content type you like.


No, Riak can store arbitrary data. The jiak interface expects JSON with a certain "schema" however.

0

精彩评论

暂无评论...
验证码 换一张
取 消