0

I am creating two projects:

  1. Mvc
  2. web api

I am make request from mvc controller action method to web api controller action method.on web api method I'm create zip folder but I don't know how to download this zip folder.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
baj9032
  • 2,414
  • 3
  • 22
  • 40
  • 1
    You sure "zip" doesn't mean zip **file**? If not, then what is a "zip folder"? – Lasse V. Karlsen Nov 08 '16 at 09:50
  • Possible duplicate of [Return Zip file as Response in Web Api](http://stackoverflow.com/questions/32992973/return-zip-file-as-response-in-web-api) – Liam Nov 08 '16 at 09:54
  • There is no such thing as a zip folder. zips are files, that may contain multiple files in folders. The question is *very* hard to understand. Are you asking how to send a binary file as a response? [This is answered here](http://stackoverflow.com/questions/9541351/returning-binary-file-from-controller-in-asp-net-web-api), essentially you return a `StreamContent` – Panagiotis Kanavos Nov 08 '16 at 09:54
  • @Liam not a good duplicate, the answer isn't clear and even uses XElement for some reason – Panagiotis Kanavos Nov 08 '16 at 09:56
  • Both questions are pretty poor IMO – Liam Nov 08 '16 at 09:56
  • Could also refer to [How do I ZIP a file in C#, using no 3rd-party APIs?](http://stackoverflow.com/questions/940582/how-do-i-zip-a-file-in-c-using-no-3rd-party-apis) – Liam Nov 08 '16 at 09:57
  • @Lasse V. Karlsen:Zip Folder means Compressed folder. – baj9032 Nov 08 '16 at 10:16
  • But if it is a file, then this is simply about downloading a file from a website, or serving up a file from your website, the "zip" part is largely irrelevant. – Lasse V. Karlsen Nov 08 '16 at 10:42
  • @Lasse V. Karlsen:but inside zip folder there is large number of images available. – baj9032 Nov 08 '16 at 10:45
  • But this does not matter. Downloading a "zip file" is still just about "downloading a file", what is *inside* the file does not matter. Unless you mean that "download" means something other than downloading the file. Please simply explain in detail what the problem is. – Lasse V. Karlsen Nov 08 '16 at 10:48

0 Answers0