Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Firebase存储检索Angular+Spring+Firebase+MongoDb应用程序中不存在视频对象数组_Angular_Firebase_Firebase Storage_Urlretrieve - Fatal编程技术网

从Firebase存储检索Angular+Spring+Firebase+MongoDb应用程序中不存在视频对象数组

从Firebase存储检索Angular+Spring+Firebase+MongoDb应用程序中不存在视频对象数组,angular,firebase,firebase-storage,urlretrieve,Angular,Firebase,Firebase Storage,Urlretrieve,我正在使用这个应用程序,我使用firebase来存储视频。 然后根据创建文件时id的名称将视频堆叠在路径中。 由于im上载多个文件,这些路径通常包含多个文件 In Firebase Storage PATH=====>/videos/idxxxxxxx video1 video2 video3 在这一点上,当我选择数据库中的对象元素时,当我使用OnInit方法从数据库中选择特定文档时,我尝试访问这些视频,因此,我的想法是与FireStorage连接,并根据一些匹配参数检索各自端点拥有

我正在使用这个应用程序,我使用firebase来存储视频。 然后根据创建文件时id的名称将视频堆叠在路径中。 由于im上载多个文件,这些路径通常包含多个文件

In Firebase Storage

PATH=====>/videos/idxxxxxxx

video1
video2
video3
在这一点上,当我选择数据库中的对象元素时,当我使用OnInit方法从数据库中选择特定文档时,我尝试访问这些视频,因此,我的想法是与FireStorage连接,并根据一些匹配参数检索各自端点拥有的视频

In my Angular App


 videos: any[] = [];

  constructor(
    private postService: PostServicesService,
   
    private fireStorage: AngularFireStorage
  ) {}

  ngOnInit(): void {
    this.idOfPost = this.urlRoute.snapshot.params['idPostView'];

    this.postService.getAPost(this.idOfPost).subscribe((result: any) => {
      
      this.postSelected = result;//getting the element selected
      

     if (this.postSelected.id) {
        this.fireStorage
          .ref('videos/' + this.postSelected.id)//////According to the selectd element desing the path to my storage and get all the childs(videos) the path conatains             
          .getDownloadURL()
          .subscribe((allVideos) => {
            this.videos.push(allVideos);
            console.log(this.videos);
          });//then simply use the getDownloadUrlMethod to susbscribe to all the elements that endpoint 
               has , pushing the elements to a variable previously initialized
      }
    });
  }
但无论出于何种原因,当我达到这一点时,错误就会出现:

ERROR FirebaseStorageError {code_: "storage/object-not-found", message_: "Firebase Storage: Object 'videos/5f70743882dea9436020bcd6' does not exist.", serverResponse_: "{↵  "error": {↵    "code": 404,↵    "message": "No…not get object",↵    "status": "GET_OBJECT"↵  }↵}", name_: "FirebaseError"}
当我再次检查firebase路由时,两个ID都匹配,但由于任何原因,端点都会收到错误。 这里是图像中的序列

我的控制台出错

在我的firebase上具有相同id的路径

路径内的视频