Hi,

Am 06.08.2012 um 14:37 schrieb Bertrand Delacretaz:

> Hi Victor,
> 
> On Mon, Aug 6, 2012 at 1:33 PM, Victor Saar <[email protected]> wrote:
>> ...I'm working on a simple web-based text editor at the moment and I wonder 
>> what the easiest way is to POST
>> file contents back to the server. Does the SlingPostServlet allow this 
>> (without using a form upload)?...
> 
> PUT does create a JCR file structure, I don't think POST does that:
> 
> $ date | curl -T - http://admin:admin@localhost:8080/foo.txt
> 
> $ curl  http://admin:admin@localhost:8080/foo.txt
> Mon Aug  6 14:34:44 CEST 2012
> 
> $ curl http://admin:admin@localhost:8080/foo.txt.tidy.2.json
> {
>  "jcr:createdBy": "admin",
>  "jcr:created": "Mon Aug 06 2012 14:33:35 GMT+0200",
>  "jcr:primaryType": "nt:file",
>  "jcr:content": {
>    "jcr:lastModifiedBy": "admin",
>    "jcr:uuid": "db850aa7-e4d4-4c37-aae2-29d4cad50055",
>    ":jcr:data": 30,
>    "jcr:mimeType": "text/plain",
>    "jcr:lastModified": "Mon Aug 06 2012 14:34:44 GMT+0200",
>    "jcr:primaryType": "nt:resource"
>  }
> }
> 
> If you need to do this from a browser, we might want to finally
> implement X-Method-Override (SLING-53).

IMHO there is no need because the POST Servlet allows file upload

Regards
Felix

> 
> -Bertrand

Reply via email to