public async Task<string> UploadDataAsync<T>(CloudBlobContainer container, string relativeUrl, List<T> reportData, string mimeType, string data, ILogger log)
{
string absoluteUri = string.Empty;
byte[] bytes = Encoding.ASCII.GetBytes(data);
using (var ms = new MemoryStream())
{
using (StreamWriter sw = new StreamWriter(ms))
{
sw.Write(data);
sw.Flush();
ms.Position = 0;
CloudAppendBlob blob;
blob = container.GetAppendBlobReference(relativeUrl);
if (await blob.ExistsAsync())
{
await blob.AppendBlockAsync(ms);
absoluteUri = blob.StorageUri.PrimaryUri.AbsoluteUri;
}
else
{
CloudAppendBlob appBlob = await CreateEmptyFileAsync(container, relativeUrl, reportData, mimeType, log);
await appBlob.AppendBlockAsync(ms);
absoluteUri = appBlob.StorageUri.PrimaryUri.AbsoluteUri;
}
}
}
return absoluteUri;
}
Getting this Exception -
Microsoft.WindowsAzure.Storage.StorageException: 'The request body is too large and exceeds the maximum permissible limit.' [External Code] PDCGeoTabFunction.Services.UploadService.UploadDataAsync(Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer, string, System.Collections.Generic.List, string, string, Microsoft.Extensions.Logging.ILogger) in UploadService.cs [External Code] PDCGeoTabFunction.Services.SyncGeoTabDataService.GetZone(Geotab.Checkmate.API, string, string, string, Microsoft.Extensions.Logging.ILogger, string, string, string, string, System.Collections.Generic.List<Geotab.Checkmate.ObjectModel.Zone>) in SyncGeoTabDataService.cs
Please help.