vendredi 2 juillet 2021

Cannot access a disposed object. Object name: 'FileBufferingReadStream'. while uploading to the azure function

 var blobContainerName = _backOfficeConfiguration.BlobContainerName;
 var blobContainer = _blobServiceClient.GetBlobContainerClient(blobContainerName);
 bool isExist = await blobContainer.ExistsAsync();
 if (!isExist)
 {
    await blobContainer.CreateAsync();
 }

 if (model.CsvFile != null)
 {
    var blobClientCsv = blobContainer.GetBlobClient(model.CsvFile.FileName);
    try
    {                   
        await blobClientCsv.UploadAsync(model.CsvFile.OpenReadStream(), true);              
    }
    catch (Exception ex) 
    {                  
    }
  }
       



Aucun commentaire:

Enregistrer un commentaire