[ 
https://issues.apache.org/jira/browse/SLING-2707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13580754#comment-13580754
 ] 

Alexander Klimetschek commented on SLING-2707:
----------------------------------------------

Ok, good, so reusing RANGE with POST and PATCH is not a feasible, 
spec-compliant option.

Then I would prefer something like c) which is baked right into the Sling POST 
servlet, as an extension to the existing file upload support [0], which works 
with multipart/form-data:

file=<partial binary>
file@RangeStart=<bytes>
file@RangeEnd=<bytes>

I am not sure if the complexity of storing and maintaining the chunks 
temporarily in the file system is worth it - considering improvements that Oak 
(Jackrabbit 3) will bring. I'd like to see the binary being stored in JCR right 
away.

It could be updated every time a new chunk is added (the missing parts might be 
filled with zeros) and a special node type (sling:PartialFile < nt:file) might 
indicate that it's not finished and keep the already-uploaded ranges in e.g. a 
multi-value property. Alternatively, it could be a set of child nt:file nodes 
each holding a chunk (and maybe encoding the range in the node name, e.g. 
"1000-2500").

[0] 
http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet%28servlets.post%29-FileUploads
                
> Support of chunked file upload into Sling
> -----------------------------------------
>
>                 Key: SLING-2707
>                 URL: https://issues.apache.org/jira/browse/SLING-2707
>             Project: Sling
>          Issue Type: New Feature
>          Components: General
>            Reporter: Shashank Gupta
>         Attachments: uploadclient.jar
>
>
> Use cases: 
> 1. Large file upload - With high speed internet connections, advent of cloud 
> and HD going mainstream, Sling should support large files (> 2GB) upload.
> 2. Fault tolerant uploads - Sling should provide capability to resume upload 
> from failure point. It should not require client to restart the complete 
> upload process. 
> 3. Faster upload: Sling should support its clients to initiate multiple 
> connection and upload file chunks in parallel. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to