FileUpload Component not working, FileUploadEvent not fired
I'm trying to use the FileUpload component with the auto mode. 

I'm on PrimeFaces 3.1.1 and jsf-api 2.1.2 in a tomcat 7.0.23 server.

I have in the **xhtml** part the next code:

    <p:fileUpload fileUploadListener="#{registroUsuariosBean.uploadFile}"
            mode="advanced"
            label="Seleccionar foto..."
            auto="true"
            sizeLimit="100000" 
            allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/>

In my **Bean** (I tryed with and without the get and set):

    private UploadedFile file = null;

...

	public void uploadFile(FileUploadEvent event) {
		file = event.getFile();
	}

	public UploadedFile getFile() {
		return file;
	}
	
	public void setFile(UploadedFile file) {
		this.file = file;
	}	


In the **pom.xml** I have added this:

		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.2.2</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.1</version>
		</dependency>


and in the **web.xml** I added this:

	<filter>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>


The component appears and I can use it but debugging with a breakpoint at the next method, never execute it. 

    public void uploadFile(FileUploadEvent event) {
		file = event.getFile();
	}


So the file is always null and I cant work with it. Anybody knows why or have any idea?

Thx in advance.
FileUpload Component not working, FileUploadEvent not fired
===

I'm trying to use the FileUpload component with the auto mode. 

I'm on PrimeFaces 3.1.1 and jsf-api 2.1.2 in a tomcat 7.0.23 server.

I have in the **xhtml** part the next code:

    <p:fileUpload fileUploadListener="#{registroUsuariosBean.uploadFile}"
            mode="advanced"
            label="Seleccionar foto..."
            auto="true"
            sizeLimit="100000" 
            allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/>

In my **Bean** (I tryed with and without the get and set):

    private UploadedFile file = null;

...

	public void uploadFile(FileUploadEvent event) {
		file = event.getFile();
	}

	public UploadedFile getFile() {
		return file;
	}
	
	public void setFile(UploadedFile file) {
		this.file = file;
	}	


In the **pom.xml** I have added this:

		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.2.2</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.1</version>
		</dependency>


and in the **web.xml** I added this:

	<filter>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>


The component appears and I can use it but debugging with a breakpoint at the next method, never execute it. 

    public void uploadFile(FileUploadEvent event) {
		file = event.getFile();
	}


So the file is always null and I cant work with it. Anybody knows why or have any idea?

Thx in advance.