Hi,
On 06/09/16 13:25, Ian Boston wrote:
On 6 September 2016 at 12:14, Marcel Reutegger <[email protected]> wrote:
This can easily be prevented if the 'in progress' binary is
uploaded to a temporary location first and then copied over
to the correct location once complete. Keep in mind that
copying a large existing binary in Oak is simply a cheap
copy of the reference.
Is that exposed as an API that can be used by Sling ?
You would use standard JCR API:
node.setProperty("jcr:data", binaryFromTempLocation)
For the Sling use case it might not be sufficient, as the chunks that are
uploaded need to be joined together to form the binary. Streaming to the
chunks is supported (in the patch I am working on), concatenating the
chunks into a final binary requires copying in and out of the DS.
I see. Then you would rather need a factory method that combines
existing binary values instead. Maybe something like:
ValueFactory.createBinary(String name, Binary... parts)
BTW, the Wiki page is immutable so I can't edit.
I can add you to the contributors group. What is your wiki
user name?
Regards
Marcel