Commit 72268045 authored by Tristan Cavelier's avatar Tristan Cavelier

JIO putAttachment method has been changed

Use it like jio_instance.putAttachment({
    _id:'doc/attachmt',
    _data:'base64data',
    _mimetype:'mime/type'
    //_rev:'..'
},[options],[callbacks]);
parent 8a3a2d9d
...@@ -345,14 +345,14 @@ ...@@ -345,14 +345,14 @@
*/ */
Object.defineProperty(that,"putAttachment",{ Object.defineProperty(that,"putAttachment",{
configurable:false,enumerable:false,writable:false,value: configurable:false,enumerable:false,writable:false,value:
function(id, rev, doc, mimetype, options, success, error) { function(doc, options, success, error) {
var param = priv.parametersToObject( var param = priv.parametersToObject(
[options, success, error], [options, success, error],
{max_retry: 0} {max_retry: 0}
); );
priv.addJob(putAttachmentCommand,{ priv.addJob(putAttachmentCommand,{
doc:{_id:id,content:doc,_rev:rev,mimetype:mimetype}, doc:doc,
options:param.options, options:param.options,
callbacks:{success:param.success,error:param.error} callbacks:{success:param.success,error:param.error}
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment