dongmangji0950 2016-04-25 19:41
浏览 49
已采纳

在Google Cloud Datastore中使用URL安全密钥

We're migrating from the old AppEngine Datastore console to the new console. Internally, we have times when we're trying to generate links to specific datastore entities.

For the old GAE console, you can use the encoded URL safe key to link to an entity, such as:

return fmt.Sprintf("https://appengine.google.com/datastore/edit?key=%s", key)

where key is the encoded URL-safe key from the entity.

However, in the new cloud console, Google returns "failed to load" when I try to load the URL:

return fmt.Sprintf("https://console.cloud.google.com/datastore/entities/edit?key=%s", key)

where key is the encoded URL-safe key from the entity.

It will load if I decode the key first and give the URL the namespace and kind, but only if it's the entity query page (not the edit page):

return fmt.Sprintf("https://console.cloud.google.com/datastore/entities/query?ns=%s&kind=%s&key=%s", namespace, kind, key)

But the purpose of an encoded key is to not have to decode that.

So my question:

Is there a way to get the new cloud console to accept the encoded key and load the entity edit page?

  • 写回答

1条回答 默认 最新

  • douyinliu8813 2016-05-31 20:36
    关注

    Google has updated the console to correctly process URL-safe keys, so this issue is now solved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?