Exemple #1
0
    private static Task UploadCommon(string uploadFromPath, string firebaseFolder, string firebaseFileName)
    {
        StorageReference uploadReference = FirebaseStorage.DefaultInstance.RootReference.Child(firebaseFolder).Child(firebaseFileName);

        FileStream stream = new FileStream(uploadFromPath, FileMode.Open, FileAccess.Read, FileShare.Read);

        return(uploadReference.PutStreamAsync(stream).ContinueWith(uploadTask => { stream.Close(); }));
    }