Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Content Picker questions

Répondu
Nouvelle publication

Commentaires

6 commentaires

  • Priyajeet

    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' });

     

    0
    Actions pour les commentaires Permalien
  • jamiegaskin

    Thank you so much, that's really helpful. Is there anywhere that describes the ContentPicker class a bit more?

    0
    Actions pour les commentaires Permalien
  • Howard

    Hi  and 

     

    Have you checked out this article here?

    https://developer.box.com/v2.0/docs/box-content-picker

    0
    Actions pour les commentaires Permalien
  • jamiegaskin

    Hi Howard,

    Thanks for the response!

    Yes, I've read through there. All the examples are split into file/folder so it's a little unclear what's part of the Content picker parent class and what's individual to files/folders.

     

    Best,

    Jamie

    0
    Actions pour les commentaires Permalien
  • Priyajeet

    FilePicker is the same as ContentPicker with type='file' hardcoded.

    FolderPicker is the same as ContentPicker with type='folder' hardcoded.

    And in ContentPicker you can just specify the type you want, comma separated list.

    I probably should add it to the documentation.

    0
    Actions pour les commentaires Permalien
  • jamiegaskin

    Great, that's really helpful. Thanks!

    0
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.