Shares files to specified user.
Parameters
| Name | Type | Description |
id required | string | instantShare id |
data required | object | action data. Pattern in example |
cb optional | function | callback function |
Example
this.instantShareAction = function(id, data, cb) {
if(data.password)
data.password = _cryptString(data.password);
return _request({
method: 'POST',
url: '/is/share/'+id,
data: data,
callback: cb
});
};
Example Result
{
contacts: ["12345678-1234-1234-1234-123456789098", "12345678-1234-1234-1234-123456789098"], // id of each recipient
files: ["12345678-1234-1234-1234-123456789098", "12345678-1234-1234-1234-123456789098"], // id of each uploaded file
folder: "12345678-1234-1234-1234-123456789098", // id of folder where uploaded files placed
subject: "example of a good written subject",
message: "example of a good written message",
expires: 0,
activates: 0,
password_protected: true,
password: "magicword",
separate_password: opt.separate_password || false, // send password in separate email
return_files: opt.return_files || false, // send request-file page
notify: opt.notify, // norify about downloads
pgp_encrypted: pgp_encryption, // crypted files or not
return_pgp_encrypted: opt.encrypt_incoming, // crypted returned files or not
message_signature: "text which will be placed right after file list"
}
0 Comments