Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow `from_copy_ref` in `copy()`

  • Loading branch information...
commit 3087a8596f27e7724f80c0603e07d6d5d4730c11 1 parent dc26593
@fent fent authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/dropbox-node.js
View
5 lib/dropbox-node.js
@@ -180,7 +180,10 @@ DropboxClient.prototype.getThumbnail = function(path, optargs, cb) {
// of arguments.
DropboxClient.prototype.copy = function(from_path, to_path, optargs, cb) {
if (typeof optargs == 'function') cb = optargs, optargs = {};
- var uri = API_URI + '/fileops/copy?' +
+ optargs.root = 'dropbox';
+ if (!optargs.from_copy_ref) optargs.from_path = from_path;
+ optargs.to_path = to_path;
+ var uri = API_URI + '/fileops/copy?' + stringifyParams(optargs);
querystring.stringify({root: 'dropbox'
, from_path: from_path
, to_path: to_path});
Please sign in to comment.
Something went wrong with that request. Please try again.