FileUpload Questions?

I need  to upload a series of files (around 2mb each), I will not be saving them directly to disk as I need to process them(change filename, add name to db, etc) then send them off to an API as a memorystream.  I would like to do this using Success event as opposed to the OnChange event because Success fires after each file as been 'uploaded', just not sure how to pull a memorystream from the args.file property.  I can easy do it in the OnChange arg.files though.  

Also, why does the Upload process take so long.  Even when I haven't hooked up any events to save the data anywhere. I'm not sure what the control is doing when is 'uploading' with the progress bar.  All I am doing is reading a 2mb file from local storage, but it take like 10-15secs to do this per file??

Thanks,
Mike

1 Reply 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team August 17, 2020 12:40 PM UTC

Hi Michael, 


Greetings from Syncfusion support. 


Query 1: I need  to upload a series of files (around 2mb each), I will not be saving them directly to disk as I need to process them(change filename, add name to db, etc) then send them off to an API as a memorystream.  I would like to do this using Success event as opposed to the OnChange event because Success fires after each file as been 'uploaded', just not sure how to pull a memorystream from the args.file property.  I can easy do it in the OnChange arg.files though.   
 
 
 
Solution:  
 
 
 
We checked the reported requirement. We would like to inform that, success event will be triggered for each file has been uploaded. So, we could not provide the memory stream in the Success event since we provided the memory stream support in the change event arguments. In addition, we suggest modifying the file and other information before uploading the file to the component using the change event. 



Query 2: Also, why does the Upload process take so long.  Even when I haven't hooked up any events to save the data anywhere. I'm not sure what the control is doing when is 'uploading' with the progress bar.  All I am doing is reading a 2mb file from local storage, but it take like 10-15secs to do this per file?? 
 
 
Solution:  
 
 
 
We would like to inform you that, when the file was selected, we made the Ajax post and showcased the rate of file transfer using progress bar. 


Regards, 
Sevvandhi N 


Marked as answer
Loader.
Up arrow icon