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

Retrieving the sharedLink URL for the uploaded file via the logged in app user?

新規投稿

コメント

1件のコメント

  • Murtza

    After uploading the file, you would have to make an API call to create a shared link for that file. In the response to this API call, you will get the shared link for the file.

     

    Here's the documentation for the Create Shared Link endpoint.

     

    Here's sample code showing how to call the Create Shared Link endpoint using the Box iOS SDK.

     

     

    BOXContentClient *contentClient = [BOXContentClient defaultClient];
    BOXFileShareRequest *shareRequest = [contentClient sharedLinkCreateRequestForFileWithID:@"file-id"];
    
    // Optional: Customize the shared link to be created
    shareRequest.accessLevel = BOXSharedLinkAccessLevelCompany;
    shareRequest.expirationDate = [NSDate dateWithTimeInterval:3600 sinceDate:[NSDate date]];
    shareRequest.canDownload = NO;
    shareRequest.canPreview = YES;
    
    [shareRequest performRequestWithCompletion:^(BOXFile *file, NSError *error) {
        // You can confirm creation of the shared link through the sharedLink 
        // property of the BOXFile that is returned.
        NSLog(@"Shared link URL: %@", file.sharedLink.url);
    }]; 

     

    0
    コメントアクション Permalink

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