How to copy a file from one document to another?

How to copy a file from one document to another?

0 votes

1 answers

415 views

ANSWER

The context of the question is too vague. Are you asking programmatically, using Rest API, automation, in JSF UI, Web UI?
02/27/2018

I use nuxeo-js-client for browser.
02/27/2018



You can use the CopyOperation.java automation operation.

To execute an operation with the JS client, please refer to https://doc.nuxeo.com/nxdoc/javascript-client/ . Something along those lines:

         nuxeo.operation('Document.Copy')
          .input(src.uid)
          .params({'target': target.uid})
          .execute()
          .then(function(newlyCreatedDoc) {
            // work with the copied doc
          })
          .catch(function(error) {
            // something went wrong
            throw error;
          });
1 votes