Esempio n. 1
0
        public async Task <bool> DeleteFile(string path)
        {
            var reference = storage.GetReference(path);
            await reference.DeleteAsync();

            return(true);
        }
Esempio n. 2
0
        public async Task <string> UploadVideo(FileResult video)
        {
            Firebase.Storage.FirebaseStorage storage = Firebase.Storage.FirebaseStorage.Instance;
            var stream = await video.OpenReadAsync();

            var name = System.Guid.NewGuid() + ".mp4";
            await storage.GetReference(name).PutStream(stream);

            stream.Close();

            var url = await storage.GetReference(name).GetDownloadUrl();

            return(url.ToString());
        }