Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Unable to upload files to OneDrive For Business more than 50MB using My Files REST API since 11th Nov

$
0
0

Hi,

I am trying to upload files to OneDrive For Business using C# consuming Office 365 (My Files) REST API. I am able to upload files size < 50MB but for larger files it simply creates the blank file but doesn't upload the stream, and it doesn't even throw me any exception, not even timeout issue. This issue is happening from yesterday only. Before that (on 10th Nov'15) 18:00 IST, I was able to upload around 1.3GB file successfully. If I try to upload file directly (without code) its working. Please find below the code snippet I am using:

 private async Task UploadStream(string fileName, IItem parentItem, Stream stream)
        {
            IItem iItem = null;
            try
            {
                //If the file is already exist then delete the file and create a new file. 
                iItem = await sharePointClient.Files.GetById(parentItem.Id).ToFolder().Children.GetByPathAsync(IncrementFolderPath +"//" +  fileName);
                await iItem.DeleteAsync();
            }
            catch (ODataErrorException)
            {
                // fail silently the file doesn’t exist
            }

            Microsoft.Office365.SharePoint.FileServices.File newFile = new Microsoft.Office365.SharePoint.FileServices.File
            {
                Name = fileName

            };
            await sharePointClient.Files.GetById(parentItem.Id).ToFolder().Children.AddItemAsync(newFile);
            await sharePointClient.Files.GetById(newFile.Id).ToFile().UploadAsync(stream);
        }

Is it an temporary issue or maintenance window, can anyone please help me with this?

Thanks In Advance!

Regards

Sheetal.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>