我尝试在云函数中访问Firebase云存储,但在云函数日志中不断收到以下错误: Error: Failed to import the Cloud Storage client library for Node.js. Make sure to install the "@google-cloud/storage" npm package. Original error: SyntaxError: Unexpected token {
at new FirebaseError (/srv/node_modules/firebase-admin/lib/utils/er
我正在尝试复制指南。
我没事,直到我需要打电话:
import * as gcs from '@google-cloud/storage';
import * as functions from 'firebase-functions';
export const onFileChange = functions.storage.object().onFinalize(object => {
// this line throws a TypeScript Error
const destBucket = gcs.bucket(fileBuck
我有一个后端,给我的Androids应用程序一个签名的网址,它可以用来上传文件。现在我想用可恢复的上载和进度监听器来扩展它。我想知道是否有可能使用Firebase Storage从我的Android应用程序中使用签名的urls进行上传。我试着用
FirebaseStorage.getReferenceFromUrl(<signed-url>)
但这将给我以下例外:
java.lang.IllegalArgumentException: Firebase Storage URLs must point to an object in your Storage Bucket. Plea
我一直在开发一个颤振应用程序,最近安装了三个与防火墙相关的程序firebase_core、cloud_firestore和firebase_storage。但安装后,当我试图将它们导入到.dart文件中时,我将面临“系统找不到指定的路径”
导入'package:quiver/core.dart';‘错误。那么我该怎么做呢,这是我的pubspec.yaml文件。我甚至尝试在pubspec.yaml中添加箭,如果这可以修复错误,但它没有。
name: bookecommerceapp
description: A new Flutter project.
# The follow
我在Linux上使用Python2.7.9,在Google-Cloud Server SDK上使用谷歌的。我的目标是上传一张图片到Google Cloud Platform,但是我得到了下面的错误。
File "/home/pi/test.py", line 15, in <module>
zebraBlob.upload_from_filename(filename='/home/pi/Pictures/testimg.jpg')
AttributeError: 'NoneType' object has no attribut
我正在尝试自动压缩上传到云存储桶上的图像。每次上传图像时,我都希望云函数运行python代码,将其转换为gzip,并将其移动到存储中的另一个桶中。
我的代码没有运行。这给了我文件找不到错误。另外,给出完整位置的正确方法是什么。
我的代码是..。
from google.cloud import storage
import gzip
import shutil
client = storage.Client()
def hello_gcs(event, context):
"""Triggered by a change to a Cloud Storage
我正在将配置文件图像上传到google云存储(运行良好),并试图将所有图像公开,但是当在img内部使用或只是在浏览器中粘贴它时,我一直从返回的url中获取403错误,返回的url如下所示:
https://storage.googleapis.com/my_bucket_name/12370691_1205162746164520_2152367844899316112_o.jpg
它给出了以下错误:
Anonymous users does not have storage.objects.get access to object my_bucket_name/15991995_384418
现状
我在我的云存储中存储个人资料-图片。每次增加/更新一次,我都会给它做一个调整大小的拇指。因此,在我的云函数中,我添加了这个触发器:
import { Storage } from '@google-cloud/storage';
import * as functions from 'firebase-functions';
import * as fs from 'fs-extra';
import { tmpdir } from 'os';
import { dirname, join } from 'path&