Determine Upload Progress when using C# API
Currently I am trying to create a web form using ASP.NET that will collect user information and then allow them to upload a file to a folder on Box. I am having no issues getting the uploading to work, but I cannot figure out a way to keep track of the progress of the upload. It would be best if the user could know the state of their upload as opposed to waiting until it is complete. I found that the UploadUsingSessionAsync method has a progress parameter, but despite executing the following code I was unable to get any response on the webpage and when I paused to debug after the await the progress object had not changed:
var progress = new Progress(val => { Message.Text = val.progress.ToString(); }); var file = await client.FilesManager.UploadUsingSessionAsync(FileUploader.FileContent, FileUploader.FileName, "*******", new TimeSpan(2, 0, 0), progress);
The file uploads just fine, but I never see the progress update on the webpage. Is there another type of method I can use or am I doing something wrong?
サインインしてコメントを残してください。
コメント
0件のコメント