Upload ajax file using nxu:inputFile not working

Hello, there is a way upload files with ajax using your “nxu:inputFile” tag inside a form like this:

<h:form>
<a4j:include viewId="/wizard/wstep1.xhtml" />
</h:form>

In “wstep1.xhtml” I show my nuxeo document and it has metadata “file:content” but when I select a file, it is erased and it not is upload

0 votes

1 answers

1247 views

ANSWER



Hi,

Your form needs to specify enctype=“multipart/form-data” for the uploaded files to be taken into account.

You cannot use a nxu:inputFile tag inside an ajax form (a4j:form) as upload of binary content is is not supported in this case.

You can also lookup the rich:fileUpload component (used on the “Files” tab by default).

2 votes



Thanks, I will try using rich component and seam component UploadItemHolder
10/17/2012