Partial uploads

I have a file uploader 

<SfUploader @ref="Uploader" ID="UploadFiles" AutoUpload=false MaxFileSize=104857600 AllowedExtensions=".wav">
                        <UploaderEvents ValueChange="OnChange" OnClear="OnClear" BeforeUpload="onBeforeUpload" Success="UploadedSuccuessfully"></UploaderEvents>
                        <UploaderTemplates>
                           Some stuff
                        </UploaderTemplates>
                    </SfUploader>

And my onchange event handler includes:

        foreach (var file in args.Files)
        {
            Code to get vale of tempAudioFile
            //Writes wav file to local disk for spectrograpgram production
            FileStream filestream = new FileStream(tempAudioFile, FileMode.Create, FileAccess.Write);
            file.Stream.WriteTo(filestream);
            filestream.Close();
            file.Stream.Close();

Code to upload file onto Azure blob storage, read & store wav file metadata and get spectrum of wav file just uploaded & upload to Azure blob storage

               }


The uploaded wav files are often (usually) truncated, usually the files are more truncated if the internet speed is lower.  It is almost as if I am doing an asynchronous upload and not doing a wait.  The files are around 3 to 4MB in size so not huge.


What have I done wrong?



2 Replies

MA Martin December 20, 2021 10:38 AM UTC

I should have said:  Dot net 5 and Syncfusion version 18.4.0.48



BC Berly Christopher Syncfusion Team December 21, 2021 03:03 PM UTC

Hi Martin, 
  
Greetings from Syncfusion support. 
  
While uploading 1 MB to 5 MB with help of your code, the uploading is working fine at our end. So, we have taken video demonstration and attached it below. 
  
  
  
Regards, 
Berly B.C 


Loader.
Up arrow icon