新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

Ho to get publicly referenced URL to a file?

新規投稿

コメント

2件のコメント

  • kendomen

    Here's an example of creating an OPEN shared link using the Box Java SDK.

    In this example, since it's open, we set it ot expire in 14 days but you don't have to.

     

    private static BoxSharedLink createSharedLink(BoxAPIConnection api, String fileId) {
            BoxFile file = new BoxFile(api, fileId);
            BoxSharedLink.Permissions permissions = new BoxSharedLink.Permissions();
            permissions.setCanDownload(true);
            permissions.setCanPreview(true);
            Date date = new Date();
    
            Calendar unshareAt = Calendar.getInstance();
            unshareAt.setTime(date);
            unshareAt.add(Calendar.DATE, 14);
    
            BoxSharedLink sharedLink = file.createSharedLink(BoxSharedLink.Access.OPEN, unshareAt.getTime(), permissions);
            logger.info("shared link: " + sharedLink.getURL());
            return  sharedLink;
        }
    0
    コメントアクション パーマリンク
  • JontyKarki

    Could you please help us how you achieved downloading functionality. We are not able to download the box file through Salesforce. Box exposed a class toolkit to access the box functionality but it is limited and there is no method exposed to download the file via Salesforce.

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

サインインしてコメントを残してください。