Copying Images and Other Binaries

Copying Images and Other Binaries

Using the JavaScript API and jQuery's save and content methods, you can copy the values of binary attributes. The following code copies the value of the binary attribute whose DOM-ID is source_binary_field to the binary attribute named target_binary_field:

You can also have an existing binary copied to a new page while creating it:

It is also possible to change the file name and the content type of the copied binary using the copy function of the binary content and providing the filename or content_type option, or both: