使用NodeJs SDK在Google云存储中生成getServingUrl() [英] Generating getServingUrl() in google cloud storage with NodeJs sdk

查看:54
本文介绍了使用NodeJs SDK在Google云存储中生成getServingUrl()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google云存储来存储图像,并且我在NodeJ上运行了服务器.

I am using google cloud storage for storing images and also I have server running on NodeJs.

我想为每张图像生成servingUrl(又名magicUrl),它会即时生成不同大小的图像(请参阅

I want to generate for every image the servingUrl(aka magicUrl) which would on the fly generate images of different sizes(see more https://medium.com/google-cloud/uploading-resizing-and-serving-images-with-google-cloud-platform-ca9631a2c556#.1jtzu5kuo)

我尝试使用gcloud sdk生成该代码,但找不到getServingUrl的任何地方.

I tried using gcloud sdk to generate that, but I couldn't find anywhere getServingUrl.

推荐答案

您似乎对Google App Engine和Google Cloud Storage感到困惑.仅 get_serving_url()方法在适用于Python的Google App Engine SDK中可用,并且当前在 Google Cloud Client中不可用Node.js库.

You seem to be confusing Google App Engine and Google Cloud Storage. The get_serving_url() method is only available in the Google App Engine SDK for Python, and is currently not available in the Google Cloud Client Library for Node.js.

这篇关于使用NodeJs SDK在Google云存储中生成getServingUrl()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆