Possible to get Blob url in CBLite 2.x?


#1

Recently upgraded from Couchbase Lite 1.3 to 2.1 on our Android client. Before, a Blob’s url was available through the API via myBlob.getContentUrl(), which allowed us to get the Blob’s path on the device and send this path to an Android VideoView, for example. In 2.x, a Blob’s url is no longer publicly available in the API – is there any way to get or derive this path so that the client does not need to implement its own logic for saving blob files to the local file system? When the Blob’s url was available before this was very easy, but now does not seem to be available?

Any help is much appreciated.

Thanks!
Ben


#2

Sorry, we took this method out because it restricted us to storing blobs as individual files; we may switch to storing them inside the database in the future.

Does the video view allow the data to be streamed (via an InputStream or something similar)? If so you can connect the blob’s content stream to it.