Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

111
Visualizações
how to call blob object as file to the asp.net MVC Controller

I successfully downloaded the file with the help of filesaver.js.

var out = doc.getZip().generate({
type: "blob",
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
}) //Output the document using Data-URI
console.log(out);
saveAs(out,"Details.docx");

In out console I am getting object which contain size, Type.

How to save this downloaded file to AWS s3 Bucket by using ASP.NET MVC

how to call the file object to the controller

public ContentResult UploadDocument()
    {
        string result = "";
        try
        {
            int fileCount = Request.Files.Count;
            HttpPostedFileBase PostedFile = Request.Files[0];
            string path = "Test" + "_" + PostedFile.FileName;

            using (IAmazonS3 s3client = new AmazonS3Client(_awsAccessKey, _awsSecretKey, RegionEndpoint.USEast1))
            {
                PutObjectRequest putObjectRequest = new PutObjectRequest
                {
                    BucketName = _bucketName,
                    CannedACL = S3CannedACL.PublicRead,
                    Key = string.Format("FolderName/" + path),
                    InputStream = PostedFile.InputStream
                };
                s3client.PutObject(putObjectRequest);
            }
            result = "Success";
        }
        catch(Exception ex)
        {
            result = ex.Message;

        }
        
        return Content(result);
    }

I am getting Request.Files.Count null in the controller

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda