You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/01/16 22:32:34 UTC

[jira] Updated: (SLING-168) Add fileupload to ujax post servlet

     [ https://issues.apache.org/jira/browse/SLING-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra updated SLING-168:
-----------------------------------

    Attachment: fileupload-r612570.patch

implemented ujax file upload and added some simple tests.


> Add fileupload to ujax post servlet
> -----------------------------------
>
>                 Key: SLING-168
>                 URL: https://issues.apache.org/jira/browse/SLING-168
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Tobias Bocanegra
>         Attachments: fileupload-r612570.patch
>
>
> currently uploaded files are handled like 'normal' fields and their
> value is read via the MultipartPostParameter's getString(). the result
> is that the properties get the string content of the uploaded files. i
> think this is not what people want.
> i suggest to implement a default behaviour that creates an 'nt:file'
> subnode for that uploaded file if the parent node is a nt:folder, or create a nt:resource otherwise.
> <form action="/home/tripod/profile" method="post" enctype="multipart/form-data">
>  <input type="file" name="./portrait" />
> </form>
> results in :
> + home
>  + tripod [nt:folder]
>    + portrait  [nt:file]
>      + jcr:content [nt:resource]
>        - jcr:data (data of uploaded file)
> or:
> + home
>  + tripod [nt:unstructured]
>    + portrait  [nt:resource]
>        - jcr:data (data of uploaded file)
> if the name is not specified, i.e. has an /* suffix, the name of the uploaded file is used for node creation.
> if the file is not uploaded at all, the node is not deleted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.