【问题标题】:How to upload video with Title & description to Firebase using flutter?如何使用颤振将带有标题和描述的视频上传到 Firebase?
【发布时间】:2020-08-19 07:14:53
【问题描述】:
 Future uploadtoServer () async{
print(videoFile);
StorageReference storageReference = FirebaseStorage.instance
    .ref()
    .child('video.mp4');
StorageUploadTask uploadTask = storageReference.putFile(videoFile, StorageMetadata(contentType: 'video.mp4'));
StorageTaskSnapshot taskSnapshot=await uploadTask.onComplete;
Uri downloadUrl = (await uploadTask.onComplete).uploadSessionUri;
final String Url = downloadUrl.toString();
print(Url);

setState(() {
  print(taskSnapshot);

});

return print(_uploadedFileURL);

}

【问题讨论】:

    标签: firebase android-studio flutter firebase-realtime-database


    【解决方案1】:

    您只能在将视频上传到 Firebase 存储后将视频链接、说明和标题保存到 Firestore 数据库。

    https://pub.dev/packages/cloud_firestore

    【讨论】:

      猜你喜欢
      • 2023-04-11
      • 1970-01-01
      • 2012-05-17
      • 2021-06-11
      • 2019-01-19
      • 2021-04-03
      • 1970-01-01
      • 2018-03-30
      • 1970-01-01
      相关资源
      最近更新 更多