blobcrate

Uploading images using Crate blob table


Is it really possible to upload image using Crate Blob table. i found this link (https://crate.io/docs/reference/blob.html) which is able to upload text on blob table.

Similarly, i am looking to upload images to crate Blob table. I didn't find the way to do this. Can somebody help on this.

Thanks, Ramesh


Solution

  • Yes it is possible to upload all kind of binary files including images to a blob table.

    For example with curl you can use:

     curl -v -XPUT localhost:4200/_blobs/foo/3b31733584613967a14d5a9ef530fbdc750c09cf --data-binary @/tmp/screenshot.png                                                                                 
    

    (The hash has to be generated beforehand, for example using sha1sum:

    sha1sum /tmp/screenshot.png
    

    The python client for example also has built-in blob support:

    https://crate.io/docs/reference/python/blobs.html