Boa tarde pessoal estou utilizando o componente <t:inputFileUpload> para realizar o upload de imagens para minha aplicação, mas quando o mesmo é armazenado o nome do arquivo e a extensão está sendo trocada para xxxx.tmp
public String processaLogotipo () {
try {
File file = new File(arquivoLogotipo.getName());
BufferedInputStream bufferedInputStream = new BufferedInputStream(this.arquivoLogotipo.getInputStream());
FileOutputStream fileOutputStream = new FileOutputStream(file);
// Salvando o arquivo
try {
byte[] buffer = new byte[1024];
int count;
while ((count = bufferedInputStream.read(buffer)) > 0)
fileOutputStream.write(buffer, 0, count);
} finally {
bufferedInputStream.close();
fileOutputStream.close();
}
} catch (IOException exception) {
exception.printStackTrace();
}
return "ok";
}
<t:inputFileUpload accept="image/*"
value="#{Usuario.arquivoLogotipo}"
storage="file"
required="true"/>