Custom folder location for attachments

19 views
Skip to first unread message

Brendan Duddridge

unread,
Aug 7, 2015, 2:41:13 PM8/7/15
to Couchbase Mobile


I know this feature isn't in Couchbase Lite (on iOS/OS X at least), but it would be great to be able to specify an alternate folder location where attachments are stored. That way rather than syncing the attachments themselves with the sync gateway (or whatever cloud based sync you're using - e.g. Cloudant), you could specify say an iCloud Drive folder location or a Dropbox folder location. That way a user could sync the database with the gateway or other cloud service (including peer-to-peer) but have all the attachments synced automatically via iCloud Drive, Dropbox, or some other service.

Would something like that even be possible with the current architecture?

I saw reference in another thread that someone had added some code to pull attachments from an AWS server so that got me thinking about this. I had asked Cloudant if they support attachments and although they said they do, they don't recommend using it. They recommended using Amazon S3 or some other service for storing the attachments. But in order to do that, it would require that I write some file syncing code. Attachments just seem way more convenient and syncing is automatic with them.



Thanks,

Brendan

Jens Alfke

unread,
Aug 9, 2015, 1:04:11 PM8/9/15
to Couchbase Mobile

> On Aug 7, 2015, at 11:41 AM, Brendan Duddridge <bren...@gmail.com> wrote:
>
> I know this feature isn't in Couchbase Lite (on iOS/OS X at least), but it would be great to be able to specify an alternate folder location where attachments are stored. That way rather than syncing the attachments themselves with the sync gateway (or whatever cloud based sync you're using - e.g. Cloudant), you could specify say an iCloud Drive folder location or a Dropbox folder location. That way a user could sync the database with the gateway or other cloud service (including peer-to-peer) but have all the attachments synced automatically via iCloud Drive, Dropbox, or some other service.

Well, those wouldn’t be attachments, at least not as far as CBL is concerned. All you’d have in CBL is a document property that refers to some binary blobs being managed using a different sync system like Dropbox. Which you’re welcome to do, and I think some apps already do — just make up a property called, say, “attachments” and put some data in it that includes S3 URLs or Dropbox paths or whatever.

If that’s not what you’re thinking of, could you describe it in greater detail?

—Jens

Reply all
Reply to author
Forward
0 new messages