BlazorFileUpload icon indicating copy to clipboard operation
BlazorFileUpload copied to clipboard

OnUploadStart/OnUploadFinished

Open zoinkydoink opened this issue 4 years ago • 5 comments

We need a way to know when an upload is started and finished so at the very least we can display "uploading" message. What would be even better is an event that shows how much of the file is actually uploading so we can give a real time progress bar of what is happening.

zoinkydoink avatar Mar 06 '20 14:03 zoinkydoink

I know Steve's BlazorFileInput does that on the multiple File Upload, I will see if I can do that as soon as I get a chance. Sorry, I have been working on moving one of my Win Forms projects to Blazor and it has occupied my time.

If this is for a commercial project (?) with a budget of a pizza, my stomach might rearrange my to do list order.

DataJuggler avatar Mar 06 '20 14:03 DataJuggler

Yep and its not even from a good pizza place, only dominos.

zoinkydoink avatar Mar 06 '20 14:03 zoinkydoink

I just looked at the code, and while I know this is possible, everything coded so far is after the upload, thus the name OnFileUploaded (past tense).

I looked at Steve's code, and I can see where the upload starts, and could put an event callback or delegate to send back the file size, but I do not understand how to measure the progress of the amount uploaded.

If you can look at Steve's code and tell me where / what / how I will include it in the project.

Sometimes I look at Microsoft Code and compare it to my own, and they do things in 4 lines of code that would take me a few classes sometimes.

I am sorry I can't be of more help, but I don't want to break something I don't understand very well.

DataJuggler avatar Mar 06 '20 16:03 DataJuggler

I did implemented multiple files and with those I included a new event OnUploadCompleted to indicate that the process of uploading files has completed (even if process is aborted the event gets trigger to let you know that everything related to the upload has finished).

araujofrancisco avatar Mar 08 '21 14:03 araujofrancisco

I lost your changes for the multiple files when I tried to merge my latest code, can you merge your code in again for fileupload.razor.cs.

Sorry, I had a choice of keep local or keep remote, I should have said keep remote.

DataJuggler avatar Mar 09 '21 09:03 DataJuggler