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

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

@Julian: If we use Range headers, then why would we need a custom patch format? 
How would you send the actual content-type (e.g. application/pdf) then?

Ideally we can make it work in a browser (so it works with what the HTML5 File 
API offers) while at the same time keeping it as simple as possible (so that 
one can easily write other http client apps). I am not sure if using the File 
blob in html5 will always use POST + multi-part form or if it also allows 
custom PATCH/POST with just the binary and a custom content-type. You could 
maybe also build a custom payload (mixing some custom data + the binary from 
the File object), but even if that works, this seems unnecessary complicated.

I see these options:
a) PATCH or POST + Range headers; plain (sliced) binary as body; custom 
content-type or encoding?
b) PATCH or POST + Range headers; body multipart-form as given by browser
c) PATCH or POST; body multipart form, one part (sliced) binary, another part 
including the range information

I prefer a), it seems the simplest.
                
> 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