1

I have a small question on how to add a folder that can be downloaded from my website. Would I call the file like how I normally call everything else (pictures, videos) and just make an: <a href="LOCATION-OF-MY-FOLDER"</a> and the browser will automatically give the option of downloading? Or is there another actual process?

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
TechWiz77
  • 69
  • 1
  • 1
  • 8
  • possible duplicate of [How to create a link that triggers file download?](http://stackoverflow.com/questions/1509056/how-to-create-a-link-that-triggers-file-download) – Codeguy007 Jun 29 '15 at 03:44
  • You can't do that with a folder, try zipping it – mas0701 Jun 29 '15 at 05:23

3 Answers3

4

You can't download folders without linking them, but what you can do is create some type of compressed file (.zip, .rar. 7z) and put the folder inside of it. and make it

<a href="LOCATION-OF-MY-FOLDER.zip">
    My Folder
</a>
mas0701
  • 303
  • 2
  • 12
1

Yes it's possible. However, it is not just for a folder, but for a file type. There are two solutions were provided in answer to this Stack Overflow question. Try out the top two ranked answers.

Community
  • 1
  • 1
Joshua
  • 5,901
  • 2
  • 32
  • 52
  • Thank you, my goodness I forgot that I needed to ZIP it first. Of course now it makes COMPLETE sense, thank you! – TechWiz77 Jun 29 '15 at 21:40
0

I don't think you can create a link to download the directory without creating a zipfile of that directory and making that available to download.

osman
  • 2,335
  • 18
  • 25