Hi,
Juerg Meier schrieb:
> Hi all,
>
> I wonder if it is possible to upload a file and the pertaining metadata in
> one
> pass.
>
> I defined a nodetype my:file > nt:file, with an additional multi value string
> property 'my:tag'.
>
> In the post,I do the following:
>
> <form....>
> ...
> <input type="file" name="./*" size="80" maxlength="128"/>
> <input name="my:tag" type="text" >
> <input name="my:tag" type="text" >
> <input type="hidden" name="./*...@typehint" value="my:file">
My guess is that this should probably be:
<input type="hidden" name="jcr:primaryType" value="my:file">
The @TypeHint notation is used to provide property type hints for
properties. To assign node types a regular jcr:primaryType property may
be used (and jcr:mixinTypes for mixin node types, if required).
HTH
Regards
Felix
> <input type="hidden" name="sling:resourceType" value="my/content">
> <input type="submit" name="Submit" value="Upload">
> </form>
>
> Well, the file gets uploaded, but I miss the my:tag values in the newly
> created note. Now I wonder if this is possible at all in one step, or if this
> needs to be done in two steps, i.e. first the upload, then attaching the
> metadata?
>
> Thanks,
> Juerg
>
>
>