我的代码有问题,我必须上传图像到防火墙存储,我需要图像来自画廊和相机,从画廊的图像是好的,但是来自相机的图像是问题,在imageView中加载并发送到数据库的图像是黑色的。有人知道如何修复这个问题吗?或者您知道其他加载映像的方法吗?
项目代码
//Funçao de escolha das opcoes de upload---------------------------------------------------------
private void jeitoImagem() {
final CharSequence[] jeito = {"Camera"
我有一个CollectionView,我正在使用来自Firebase存储的图像来填充。我将图像存储在“userId”节点下。我希望检查节点下可用的大量文件,以便将它们存储在数组中。
我试图为每个urls分别检索urls,但是,我认为这是一个非常错误的方法。但是,我不知道如何以最有效的方式完成它,以及将collectionView.reload()放在哪里。我就是这样做的:
let storage = FIRStorage.storage()
let firstImageRef = storage.referenceForURL("gs:storageUrl").child(ui
我尝试将图像上传到firebase存储,并从firebase存储中检索图像。但是,“检索”案例并不起作用:
// image upload
var storageRef = firebase.storage().ref('profilePicturesOfAbmin/original/'+file.name);
storageRef.put(file);
function error(err) {
console.log("error",err);
}
// retrieve image from firebase storage
var stora
我无法从firebase中检索图像或名称。如何从firebase存储中检索我的映像?
E/StorageException: StorageException has occurred.
Object does not exist at location.
Code: -13010 HttpResult: 404
E/StorageException: { "error": { "code": 404, "message": "Not Found. Could not get object" }
我正在尝试将来自firebase的图像显示到html img标记中,但它无法检索图像。 Javascript代码: var storageRef = firebase.storage().ref();
var spaceRef = storageRef.child('images/photo_1.png');
var path = spaceRef.fullPath;
var gsReference = storage.refFromURL('gs://test.appspot.com')
storageRef.child('images/photo
在使用包将文件上载到Firebase时遇到问题。
接收到的错误是Uncaught (in promise) TypeError: storageRef.child is not a function
首先,firebase被导入到GatsbyJS Layout.js in componentDidMount中
Layout.js
componentDidMount() {
const app = import('firebase/app');
const auth = import('firebase/auth');
const database =
我使用Firebase存储将图像存储在FB中,将下载URL保存在实时数据库中,并从存储中检索一些照片,我使用以下代码:
let storage = FIRStorage.storage()
imageRefInDB.observeEventType(.Value, withBlock: { (snapshot) in
// Get download URL from snapshot
let downloadURL = snapshot.value as! String
// Create a storage reference f
我想学习如何为当前用户正确地从Firebase检索图像,我正在尝试从User表中获取用户的User,并使用该url向下显示图像,但它不会这样做,并导致应用程序崩溃。我想知道我是做得对还是做错了。提前谢谢你
func retrieveTheImage() {
let userID = Auth.auth().currentUser?.uid
let retrieveTheUrl = Database.database().reference().child("User").child(userID!)
var
从其他的SO回答(例如Firebase Storage: Play back of a video url directly?),我了解到Firebase不支持视频流,所以我不能只提供一个<video>元素我的URL,并期望它回放资源。因此,我应该如何在我的网站上显示存储在Firebase存储中的视频?
我正在尝试检索上传的新文件的下载url,这样我就可以将其写入我的数据库。我同时使用了和,但在我的函数中遇到错误。
下面是我的导入:
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
import { FieldValue } from "@google-cloud/firestore";
import { _namespaceWithOptions } from "firebase-functions/lib/