Yes, in version 2.0 I can get blob’s url like your curl.
But now something was changed in couchdatabase and attachment path changed from
“_attachments”: {
“blob_1”: {
}
}
to
“ attachments": {
"blob /yourKey”: {
}
}
and I can’t get url. I checked many combinations.
In your example, the URL should be like http://serverURL:4984/db-name/document-id/blob_/data/imageData1 – it’s the document URL plus a slash plus the key from the _attachments dictionary.
I’m entering the URL like this: http://serverURL:4984/db-name/document-id/blob_/data/imageData1 http://serverURL:4984/db-name/document-id/blob/data/imageData1 http://serverURL:4984/db-name/document-id/_attachments/blob_/data/imageData1 http://serverURL:4984/db-name/document-id/attachments/blob_/data/imageData1
but response: {"error":"not_found","reason":"unknown URL"}
Huh. Sync Gateway might not be handling the slashes in the attachment name correctly. In those URLs try escaping the slashes, i.e. blob_/data/imageData1 to blob_%2Fdata%2FimageData1.