将 pdf 文件预上传到 Firebase
Pre-uploading pdf-files to Firebase
我正在开发一个可以显示 pdf 文件(含讲座)的 Android 应用程序。这些文件应该存储在云端,每个用户(学生)都应该可以访问它们。
想法是用户不能上传文件,他们只能阅读它们,所以应该预先上传文件。可以在 Cloud Firestore 中执行吗?我搜索了很多,但没有找到任何使用计算机和 Firebase 控制台预上传文件的机会。
非常感谢!
正如其他人评论的那样,最好将文件上传到云存储,云存储也可以作为 Firebase 的一部分进行访问。
要实现您的方案,您可以通过 Firebase console, and then set the security rules to determine who can access those files either to allow only reads, or to not even allow those and instead use download URLs 上传文件以访问它们。
我正在开发一个可以显示 pdf 文件(含讲座)的 Android 应用程序。这些文件应该存储在云端,每个用户(学生)都应该可以访问它们。
想法是用户不能上传文件,他们只能阅读它们,所以应该预先上传文件。可以在 Cloud Firestore 中执行吗?我搜索了很多,但没有找到任何使用计算机和 Firebase 控制台预上传文件的机会。
非常感谢!
正如其他人评论的那样,最好将文件上传到云存储,云存储也可以作为 Firebase 的一部分进行访问。
要实现您的方案,您可以通过 Firebase console, and then set the security rules to determine who can access those files either to allow only reads, or to not even allow those and instead use download URLs 上传文件以访问它们。