DocumentRepository.cs
/// <summary>
/// Get a file stream by file name
/// </summary>
/// <param name="fileref"></param>
/// <returns></returns>
Get a file stream by file name
Get a file stream by file name
public async Task<Stream> DownloadDocument(String fileref)
        {
            var url = $"https://flexinets.sharepoint.com/_api/web/GetFolderByServerRelativeUrl('/PortalDocuments')/Files('{fileref}')/$value";  
            var client = await GetAuthenticatedClient();
            return await client.GetStreamAsync(url);
        }
public async Task < Stream > DownloadDocument ( String fileref ) { var url = $" https://flexinets.sharepoint.com/_api/web/GetFolderByServerRelativeUrl('/PortalDocuments')/Files(' { fileref } ')/$value " ; var client = await GetAuthenticatedClient ( ) ; return await client . GetStreamAsync ( url ) ; }
Get a file stream by file name
Get a file stream by file name
// todo does this need escaping or does sharepoint handle that?
None
fileref
String
None