Exemple #1
0
        public IActionResult CargarProductosBodega([FromForm] IFormFile files)
        {
            try
            {
                ImagenA4Logic.CrearPDFA4(files);

                //return this.File(ImagenA4Logic.CrearPDFA4(files).ToArray(), "application/pdf", "EjemploPDF.pdf");

                return(Ok());
            }

            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Exemple #2
0
        public IActionResult CargarProductosBodega([FromForm] List <IFormFile> filesList)
        {
            try
            {
                if (filesList.Count > 0)
                {
                    foreach (var files in filesList)
                    {
                        ImagenA4Logic.CrearPDFA4(files);
                    }
                }


                return(Ok());
                //return (context.CargarProductoBodega(productoBodega));
            }

            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
                //return (ex.ToString());
            }
        }