Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

upload multiple file using the Dropzonejs and Asp .net core

$
0
0

Hi :

I am using Asp .net Core to upload multiple files using the Dropzonejs  ,it works fine without using the Dropzonejs ,  but I don't know why it is not work with it.

 
             var uploads = Path.Combine(_environment.WebRootPath, "uploads");
            var filenames="";

            foreach (var file in files)
            {
                if (file.Length > 0)
                {
                    using (var fileStream = new FileStream(Path.Combine(uploads, file.FileName), FileMode.Create))
                    {
                        await file.CopyToAsync(fileStream);
                        //await file.SaveAsAsync(fileStream);
                        filenames += file.FileName;

                    }

                }
            }

       


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>