首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Firebase REST API

Firebase REST API
EN

Stack Overflow用户
提问于 2016-09-11 21:27:51
回答 1查看 429关注 0票数 0

嗨,有没有办法使用iOS的REST调用从Firebase Storage下载镜像,或者我必须使用iOS SDK?

EN

回答 1

Stack Overflow用户

发布于 2016-09-11 23:09:04

Firebase Storage构建于Google Cloud Storage之上,因此您可以使用该REST API来访问文件。在应用程序中,下载文件的常见方式是使用download URL that you can get for a file和图像下载库。链接文档中的示例:

代码语言:javascript
运行
复制
// Create a reference to the file you want to download
let starsRef = storageRef.child("images/stars.jpg")
// Fetch the download URL
starsRef.downloadURLWithCompletion { (URL, error) -> Void in
  if (error != nil) {
    // Handle any errors
  } else {
    // TODO: download from URL with a REST GET call
  }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39436596

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档