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/02/01 21:39:08 UTC
[jira] Closed: (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 closed SLING-168.
----------------------------------
> 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
> Assignee: Bertrand Delacretaz
> 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.