top of page
Post: Blog2_Post

How to Upload File to Firebase Storage using C#

//Step 1: Create the following function to upload the file

public async void uploadFile()


var stream = File.Open(@"d:\sankar.png", FileMode.Open);

var auth = new FirebaseAuthProvider(new Firebase.Auth.FirebaseConfig("Api Key"));

var a = await auth.SignInWithEmailAndPasswordAsync("", "password");

string fn = DateTime.Now.Ticks.ToString()+".jpg";

var task = new FirebaseStorage(


new FirebaseStorageOptions


AuthTokenAsyncFactory = () => Task.FromResult(a.FirebaseToken),

ThrowOnCancel = true,





task.Progress.ProgressChanged += (s, e) => Console.WriteLine($"Progress: {e.Percentage} %");

var downloadUrl = await task;


//Step 2 add the following highlighted one

<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="Category_master.aspx.cs" Inherits="" Async="true" %>

9 views0 comments

Recent Posts

See All

How to create cursors in microsoft sql server

-- how_to_use_cursors 2023,9 alter procedure how_to_use_cursors @year bigint, @month bigint as begin declare @employee_id bigint declare @No_of_days_present bigint declare @total_no_of_days bigint dec


bottom of page