Can file preview (iframe method) work in Chrome with "Block third-party cookies" on?

新規投稿

コメント

6件のコメント

  • MurphGH

    We're experiencing the exact same problem. The only way we've been able to resolve so far is asking customers to disable this setting, which hasn't gone over very well...

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

    Hi  and ,

     

    Thanks for posting to our forums! Love to see developers interact on here. 

     

    On a sadder note, the cookie dependency is unfortunately expected behavior for now. We've updated our documentation to reflect that:

    https://developer.box.com/reference#get-embed-link

     

     

    Taking advantage of the Content Preview UI Element has been a good workaround for most people, since it does not rely on iFrames:

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

     

    We're working on a more expansive side-by-side comparison of Embed Links and the UI Elements to help developers 1) be aware that the elements exist but also 2) when to use one over the other. Embed links are easier, but have fewer features/customizations available, while the UI Elements take slightly more work to set up but have more options available.

     

    You can see many examples here:

    https://codepen.io/box-platform/pens/public/?grid_type=list

     

    Take a look and hopefully you'll see something in there that works for you. 

    0
    コメントアクション パーマリンク
  • chip-honey

    The one problem here is that when using this with the new API for viewing files, this will expose our access token in both the file source and the network request. Is there a way to instead, create a secure/signed URL via the Box API and pass this to the Content Preview UI show() method?

    0
    コメントアクション パーマリンク
  • chip-honey

    Acutally, just found the downscope token endpoint and that should work for this.

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

     Great find! Your concern is valid and is the exact reason we created the ability to downscope tokens 🙂 Happy previewing!

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

    We made a recent change and you should no longer need to disable third party cookies for expiring embed to function. Can you please see if things work for you now  ?

    Also, here's a guide for the different ways you can embed Preview onto your site: https://developer.box.com/docs/using-box-preview-in-your-application

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

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