コメント

3件のコメント

  • mwiller

     The list of folders in the file path is contained in the `path_collection` field of the API response; you need to concatenate the names of all those folders.  Something like this should do the trick:

     

    BoxFile.Info file = new BoxFile(api, fileID).getInfo();
    
    String path = "";
    for (BoxFolder.Info folder : file.getPathCollection()) {
        path += "/" + folder.getName();
    }
    
    path += file.getName();
    
    // path contains a string like "/All Files/My Stuff/Document.pdf"
    0
    コメントアクション パーマリンク
  • jeongsulee

    File object has an attribute called "path_collection."

    You can look at this for more detail:

    https://developer.box.com/reference/resources/file/#param-path_collection

    0
    コメントアクション パーマリンク
  • CSP Development

    We are getting the path of the File from API for example 

    "/All Files/My Stuff/Document.pdf"

    how to generate URL for it that works based on the path?

    https://app.box.com/folder/ 

    0
    コメントアクション パーマリンク

投稿コメントは受け付けていません。