// Get any Stream - it can be FileStream, MemoryStream or any other type of
// Stream
var stream = File.Open(@"C:\Users\you\file.png", FileMode.Open);
// Constructr FirebaseStorage, path to where you want to upload the file and
// Put it there
var task = new FirebaseStorage("your-bucket.appspot.com")
.Child("data")
.Child("random")
.Child("file.png")
.PutAsync(stream);
// Track progress of the upload
task.Progress.ProgressChanged += (s, e) => Console.WriteLine($"Progress:
{e.Percentage} %");
// await the task to wait until upload completes and get the download url
var downloadUrl = await task;
如何返回进度条的百分比并显示大文件的上传百分比。我需要知道应该返回什么ActionResult? JsonResult? ContentResult?以及如何从我的ajax帖子中获取百分比。