kwent/syno

How Call additional ?

Closed this issue · 4 comments

Hello,

I follow the synology documentation to call additional like that:

syno.fs.list({
        folder_path: path,
        additional: "real_path,owner,time"
      }, (error, architecture) => {
        if (error) {
          res.status(400);
          return res.send(error);
        }
        return res.json(architecture);
      });

That not working ..
But only one aditionnal working.. like that

syno.fs.list({
        folder_path: path,
        additional: "real_path"
      }, (error, architecture) => {
        if (error) {
          res.status(400);
          return res.send(error);
        }
        return res.json(architecture);
      });

Thanks for help

kwent commented

Hi,

Does not sound like a syno.js issue. Have you tried a curl request instead to see the answer ?

Regards

With this code :

static test(req, res){
  syno.fs.list({
    folder_path: "/WebResources",
    additional: "time"
  }, (error, architecture) => {
    if (error) {
      res.json(error);
    }
    res.json(architecture);
  });
}

get this output :

{
    "files": [
        {
            "additional": {
                "time": {
                    "atime": 1587208664,
                    "crtime": 1586976463,
                    "ctime": 1587065734,
                    "mtime": 1586977749
                }
            },
            "isdir": true,
            "name": "my folder",
            "path": "/WebResources/my folder"
        },
        ...
    ],
    "offset": 0,
    "total": 12
}

if I replace additional: "time" by additional: "time,real_path,size" => get that :

{
    "files": [
        {
            "isdir": true,
            "name": "my folder",
            "path": "/WebResources/my folder"
        },
        ...
    ],
    "offset": 0,
    "total": 12
}

I have same issue.. I can only request one field using the additional parameter.. I suspect it to be a Synology problem, since I experience the same if I use the direct url.. The official API suggests %2C (unicode for ,) as a delimiter. But that doesn't work either.

kwent commented

@jensstigaard @Afondevi I don't think i can do much. I would contact Synology support and see what they are thinking.