public Arquivo.Arquivo SalvarTemp(HttpPostedFileBase filePosted) { if (filePosted == null) { Validacao.Add(Mensagem.Arquivo.ArquivoInvalido); return(null); } Arquivo.Arquivo arq = _gerenciadorTemp.SalvarTemp(filePosted.InputStream); arq.Id = 0; arq.Nome = Path.GetFileName(filePosted.FileName); arq.Extensao = Path.GetExtension(filePosted.FileName); arq.TemporarioPathNome = string.Empty; arq.ContentLength = filePosted.ContentLength; arq.ContentType = filePosted.ContentType; Validacao.Add(Mensagem.Arquivo.ArquivoTempSucesso(arq.Nome)); return(arq); }