Guys, I'm going through a pretty annoying and seemingly simple problem and I have not found a solution yet, can anyone help me? I am using the upload of primefaces and it simply does not upload files larger than 10mb ... A 9.9mb file goes normal. = o
Would you like to know where I change to increase this limit?
Here is the code I'm using:
<p:fileUpload multiple="false" cancelLabel="Cancelar" label="Selecionar Brasão..." fileUploadListener="#{back.uploadArquivo}" mode="advanced" dragDropSupport="true" auto="false"
fileLimit="1" sizeLimit="51380224" update="panel_grid_upload_arquivo, :growl" />
back:
public void uploadArquivo(FileUploadEvent event) {
DocumentoEntity arquivo = new DocumentoEntity();
try {
arquivo.setArquivo(IOUtils.toByteArray(event.getFile().getInputstream()));
arquivo.setNomeArquivo(event.getFile().getFileName());
arquivo.setNome(event.getFile().getFileName());
this.arquivo = arquivo;
exibirMensagemSucesso("Upload feito com sucesso", "O arquivo agora está associado ao documento");
} catch (IOException e) {
exibirMensagemErro("Ocorreu algum erro", "Ocorreu algum erro e o upload não pôde ser feito");
LOGGER.error("Não realizou o upload do arquivo");
e.printStackTrace();
}
}
My web.xml has these settings:
<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>
A file larger than 10mb does not even reach the bean. Thanks in advance for any help!