Box WebApp Integration获取所选文件的父详细信息

时间:2016-03-02 23:22:38

标签: javascript box-api box

在我的网络应用中使用Box filepicker。配置如下:

在我的HTML中,添加了:

<script src="https://app.box.com/js/static/select.js"></script>

并在JS文件中,

var options = {
  clientId: myClientID,
  linkType: 'shared',
  multiselect: 'true'
};
var boxSelect = new BoxSelect(options);

// Register a success callback handler
boxSelect.success(function(response) {
  console.log(response[0].id); //This is giving me the fileId of a selected file
  console.log(response[0].id.parentNode); //Tried this to get parent (folder name associated to the selected file and gets undefined)
});
// Register a cancel callback handler
boxSelect.cancel(function() {
  console.log("The user clicked cancel or closed the popup");
});

$scope.launchBoxFilePicker = function() {
  boxSelect.launchPopup();
};

您是否可以指导我如何获取所选文件的父级详细信息。

1 个答案:

答案 0 :(得分:0)

根据设计,文件的父详细信息不会通过Box文件选择器公开。