你们知道如何将PDF文件直接上传到Firebase项目存储中吗?我在网上搜了很多,但什么也没找到。
有C#的图书吗?或者有C#和Firebase的文档吗?
救救伙计们!谢谢
编辑:
好的,我找到了一个库: FirebaseSharp。
https://github.com/bubbafat/FirebaseSharp
但是这个Lib只支持以前版本的Firebase,也不支持存储。
发布于 2017-01-05 12:54:24
下面是一个示例用法:
// 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);
// Construct 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;
还有一个相关的博客帖子。
https://stackoverflow.com/questions/40912779
复制相似问题