Sebastien Kerroue
Sebastien Kerroue

Reputation: 288

List files of other device Ionic

I am working on a Ionic project. I control a GoPro with my application. Now, I need to access to the list of all videos.

Videos are contained in this folder : http://10.5.5.9/videos/DCIM/100GOPRO/ .

I am trying to get the list with the plugin File. This is my code:

this.file.listDir("http://10.5.5.9/videos/DCIM/100GOPRO/", '').then(
      (files) => {
        for(var i in files)
        console.log(i);
      }
      ).catch(
      (err) => {
        console.log("ERROR : " + err);
      }
    );

But when I run my code, I always go in the error case. If someone knows how to fix it and get the list of all the files in the folder, I would be really grateful!

Upvotes: 0

Views: 34

Answers (1)

konraditurbe
konraditurbe

Reputation: 165

It's better to use the JSON endpoint: http://10.5.5.9/gp/gpMediaList

Upvotes: 1

Related Questions