How can I mount an upload page, which can receive photos, video and zip packages containing photos and / or videos?

0

I am like an application where the registered user has a page of uploads of images and videos and wanted to know if he has, as well as receiving photos and videos by uploads, if I can receive zips packages with photos and videos, where application can get these packages out of zip to be able to name and then allocate those files on the server. I'm using ASP.NET MVC 5, razor and some features in javascripts.

    
asked by anonymous 16.10.2017 / 00:47

1 answer

0

Yes. Using the same input file. Only change how the file is handled on the server side depending on the file extension.

Save the file and manipulate it using the System.IO reference.

Refer to a ZIP extraction component such as DotNetZip 1.10.1 (Nuget Pack)

  using (ZipFile zip = ZipFile.Read(PathDoArquivo))
  {
    foreach (ZipEntry e in zip)
    {
      e.Extract();
    }
  }
    
17.11.2017 / 17:11