1

I've added the dropbox chooser to my app like so:

<script type="text/javascript" src="js/dropins.js" id="dropboxjs" data-app-key="my app key is here"></script>

$('#dropbox-choose').on('touchend', function(){
    Dropbox.choose({
        success: function(file){
            console.log("Here's the file link:" + file[0].link)
        },
        cancel: function() {

        },
        linkType: "direct",
        multiselect: false,
        extensions: ['.pdf', '.doc', '.docx' , '.txt' , '.rtf' ,'.wps' , '.odt']
    });
})

it goes to load up the chooser, but I get an 'error':'invalid origin' every time

any ideas?

rpsep2
  • 3,061
  • 10
  • 39
  • 52

1 Answers1

0

Your app runs locally so that's a security issue. What I suggest is that you host this integration on your own server, add that server to the allowed domains within dropbox and open that server page to handle the integration.

Andrew
  • 510
  • 5
  • 6