1
votes

I am very new to cassandra and I have installed cassandra and libQTcassandra on a linux machine. I want to insert image files like .jpg or .png into cassandra(images are small, couple of MBs).

How can send image files to cassandra server to insert into column of a column family? Will you please give me an example in C++ code.

I know that i can use image file name as column name but i don't know how to send image file to cassandra. Any help is greatly appreciated...

Thanks, Swat

1

1 Answers

0
votes

I am not familiar with the libQtCassandra library, but looking at the API it appears that what you need to do is use a QCassandraValue populated with a byte array containing your image data. The QCassandraValue class implements a constructor that takes in a QByteArray, which could be used for this purpose.