1
Guys, I’m going through a very boring and seemingly simple problem and I haven’t found a solution yet, so can someone help me? I’m using the upload of the first faces and it just doesn’t upload files larger than 10mb... A 9.9mb file will be normal. = o
I wonder where I change to raise this limit?
Follow 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 is with 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 bigger than 10mb doesn’t even get into the bean. From now on I appreciate any help!
Which application server you are using?
– Luídne