Hello Everyone,
While developing, I stuck to download the single document and also multiple document from SharePoint document library which is in Office 365 site.
I have created Sandbox Solution, while developing such things i observed SPFile.OpenBinaryStream is not available into sandbox solution (namespace Microsoft.SharePoint.dll).to get the file.
Do how to download single and multiple document from document library?
Do how to download single and multiple document from document library?
-- I tired also zip functionality using
http://www.sharepointanalysthq.com/2012/10/download-multiple-documents-for-sharepoint-2010/
--DeviantPoint.DownloadZip
also but not getting any result.
Many Thanks,
Sumit


Manoj BhoirRank #599 · 4K reputationPosted Aug 6, 2015, 8:57 PM EDT
SharePoint: Download document Library file From Remote Client[^]
Krishna MurthyRank #1,919 · 764 reputationPosted Aug 6, 2015, 9:00 PM EDT
Sumit DeshmukhRank #597 · 4K reputationPosted Aug 6, 2015, 11:56 PM EDT
Sumit DeshmukhRank #597 · 4K reputationPosted Aug 6, 2015, 11:56 PM EDT
Krishna MurthyRank #1,919 · 764 reputationPosted Aug 6, 2015, 11:58 PM EDT
Sumit DeshmukhRank #597 · 4K reputationPosted Aug 7, 2015, 12:03 AM EDT
Krishna MurthyRank #1,919 · 764 reputationPosted Aug 7, 2015, 12:59 AM EDT
Sumit DeshmukhRank #597 · 4K reputationPosted Aug 7, 2015, 5:08 AM EDT
Krishna MurthyRank #1,919 · 764 reputationPosted Aug 9, 2015, 8:20 PM EDT
using ( var ctx = new ClientContext( "siteUrl" ) ) { ctx.Credentials = new SharePointOnlineCredentials( userName, secureStringPassword ); var query = new CamlQuery { ViewXml = "" + "" + "" + "" + "" + "0" + "" + "" + "" + "" }; var web = ctx.Web; var list = web.Lists.GetByTitle( library); var items = list.GetItems( query ); ctx.Load( items, collection => collection.Include( i => i.File.ServerRelativeUrl, i => i.File.Name ) ); ctx.ExecuteQuery(); if ( items != null ) foreach(var item in items) { using ( var fi = File.OpenBinaryDirect( ctx, item.File.ServerRelativeUrl ) ) { FileStream fileStream; using ( fileStream = new FileStream( @"fileDestination", FileMode.Create ) ) { if ( fi != null ) fi.Stream.CopyTo( fileStream ); } } } }Krishna MurthyRank #1,919 · 764 reputationPosted Aug 13, 2015, 8:24 PM EDT