
Last month, I had to download course material from Microsoft. They specially opened up a WSS site, and provided all the downloads through document libraries. Very nice, however…this meant I had to 'click-download-click-download-click-download' all the documents in the gallery since there isn't a 'download all documents' option available.
I was a bit annoyed by the absence of such a feature, so I decided to create one myself. Thanks to the great extensibility capabilities of WSS v3, I was able to create a new add-in to document libraries which gives you a 'Download all documents' option in the action menu of the document library.
Clicking this option will generate a zipfile containing all the documents in the list and provides it as a download to you. I used the SharpZipLib to create the actual zipfile. I didn't want to 'eat' lots of server resources while creating the zipfile, so after you click it it immediatly starts writing to the reponse outputstream. This has one limitation though, if you get the 'save, open, run' dialog from your browser…you already have downloaded the entire zipfile to your machine.
I have provided two downloads for you:
8 comments
Hi, i got following error after i deployed the solution and clicked on ‘download all documents’
Request for the permission of type ‘Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ failed.
any idea?
junaid raza
Yes, Raise the trust level to “Full” ๐
bartg
Hi Guys,
This feature is pure gold.
What did you have to do to get the DownloadDocs.aspx page to have a code behind page?
Nimrod Rozenfeld
Hi Nimrod,
Glad you like it!
To answer your question, edit the Assembly attribute in the <% Page %> tag inside the aspx file and refer to the signed assembly. Deploy the assembly in the GAC and presto! ๐
(Check out the sources if you like)
Hope this helps.
Bart
bartg
Hi Bart,
Thanks for the prompt reply, I noticed the DownloadAllDocumentsWeb.dll is not the GAC. am I wrong?
Nimrod Rozenfeld
Nope, you are right sorry ๐
So the proper answer to your previous question was:
You need to edit the Assembly attribute in the <% Page %> tag inside the aspx file and refer to the assembly. Deploy the assembly in the bin directory of the webapplication and you are ready to go.
However, you could also put the assembly in the GAC and refer to it throught the Page tags.
bartg
Not sure how to set the trust level to full. Could you clarify?
Thanks!
Greg Palmes
Edit the web.config, search for the tag and change the level to ‘Full’ (case sensitive!)
bartg