【问题标题】:how to upload an image to the firebase with specific user only in reactnative?如何仅在本机反应中使用特定用户将图像上传到firebase?
【发布时间】:2019-07-02 06:49:25
【问题描述】:

我正在构建一个应用程序作为我的作业,但遇到了一个问题,我不明白如何添加特定用户的图像,然后在登录后显示?

【问题讨论】:

  • 请您提供有关该过程的更多信息吗?

标签: firebase react-native authentication react-redux


【解决方案1】:

您可以使用 Google Cloud Storage 从移动设备或后端上传您的图片。

您需要为此注册Google Cloud Console

如果你想直接从设备上传,你可以像这样使用 REST API:

curl -X POST --data-binary @[OBJECT_LOCATION] \
-H "Authorization: Bearer [OAUTH2_TOKEN]" \
-H "Content-Type: [OBJECT_CONTENT_TYPE]" \
"https://www.googleapis.com.com/upload/storage/v1/b/[BUCKET_NAME]/o?uploadType=media&name=[OBJECT_NAME]"

提到here

【讨论】:

    猜你喜欢
    • 2020-02-22
    • 2019-06-02
    • 1970-01-01
    • 2021-12-26
    • 2018-05-28
    • 2022-07-18
    • 1970-01-01
    • 1970-01-01
    • 2020-03-23
    相关资源
    最近更新 更多