Content Picker questions
回答済みHi,
I have a couple questions.
1. Is there a way to show the content picker in a modal window via javascript? I see that you can make it show a button to open a modal window, but what if I want to skip the button step entirely?
2. Is there a mode that allows selection of both files and folders?
Thanks in advance,
Jamie
-
1. That is something you will have to implement yourself. You can do something like
window.open('https://codepen.io/box-platform/live/PWPxBm', 'sdfsdf', "width=800,height=600')
However you will have to also write some code to pass data from the modal to the parent window via postMessage (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) or window.opener (https://developer.mozilla.org/en-US/docs/Web/API/Window/opener) or some other mechanism, so that what the content picker chooses, gets sent back to your code that opened the popup.
2. Use ContentPicker parent class instead of FolderPicker or FilePicker. It accepts a type option which can be 'file,folder,web_link'
var contentPicker = new Box.ContentPicker();
contentPicker
.show(folderId, accessToken, { type: 'file,folder,web_link' });
-
Hi and
Have you checked out this article here?
サインインしてコメントを残してください。
コメント
6件のコメント