cancel
Showing results for 
Search instead for 
Did you mean: 

binary content modification using JavaScript API

sugai
Champ in-the-making
Champ in-the-making
Smiley Happy
Hello!

I saw document about "Modifying and Creating API for JavaScript" from Alfresco Wiki.

The document describe for "content" property,
"The content of the node can be modified by setting this property.",and
"However it is not recomend that nodes with binary content are manipulated in this way!".

Is there any way to modify binary content using JavaScript API ?

Please advice me!

I tryed example script following , this script did not work correctly.

        var workingCopy = doc1.checkout();
        workingCopy.content = doc2.content;
        doc1 = workingCopy.checkin();
2 REPLIES 2

davidc
Star Contributor
Star Contributor
A recent enhancement was made to allow this, but it didn't make 2.1 Community final.  Expect to see the enhancement on svn HEAD in the next few days.

Anyway, with the enhancement you'll be able to write:

workingCopy.properties.content.write(doc2.properties.content);

sugai
Champ in-the-making
Champ in-the-making
:lol:
thank you davidc for your answer.

I am waiting for the enhancement.