cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure the domain to the chooser's frame-ancestor

How to configure the domain to the chooser's frame-ancestor

yyyhhh
Explorer | Level 4

Hi~I used the chooser's iframe embedding (as shown in the code). However, it's not displaying correctly due to frame-ancestor restrictions. How can I add my domain to frame-ancestor? Is this in the app's setting page? It doesn't seem to work. 


Thanks in advance~

 

 

const comp = new Dropbox.Chooser({
      appKey: "",
      onSuccess: () => {
      },
      onCancel: () => {
      },
      linkType: "preview",
})
Dropbox.mount(comp, document.getElementById("container"));

 

 

yyyhhh_0-1724666277107.png

yyyhhh_1-1724666328088.png

 

 

2 Replies 2

Здравко
Legendary | Level 20

@yyyhhh wrote:

... How can I add my domain to frame-ancestor? Is this in the app's setting page? It doesn't seem to work. 

...

yyyhhh_1-1724666328088.png


You have answered to your question already and it should work.

One thing that you missed is Chooser cannot be mounted! Only Dropbox Embedder can be mounted.

Dropbox Chooser may only open in new frame where user can select whatever intended. Setup it as noted here and use as described there. You may need to redesign your page.

Good luck.

Greg-DB
Dropbox Staff

@yyyhhh As Здравко said, you'll need to implement the Dropbox Chooser as covered in the documentation.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?