Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

110
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda