binary content modification using JavaScript API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2007 10:10 PM

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();
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2007 06:01 AM
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);
Anyway, with the enhancement you'll be able to write:
workingCopy.properties.content.write(doc2.properties.content);

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2007 09:07 AM
:lol:
thank you davidc for your answer.
I am waiting for the enhancement.
thank you davidc for your answer.
I am waiting for the enhancement.
