Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Perotti 53 posts 94 karma points
    Mar 16, 2015 @ 13:31
    Alex Perotti
    0

    undefined api key

    Hello;

    I have configured the datatype, but it throws an error when opening dialog:

    {"error": "Invalid app_key"}

    the url of the dialog is

    https://www.dropbox.com/chooser?origin=http%3A%2F%2Flocalhost%3A61979&appkey=undefined&linktype=direct&trigger=button&multiselect=false&extensions=&folderselect=false&iframe=false&version=2

    if I manually enter the key in url it opens; seems that there is an error in the renderer of the control.

    Can you help me (or send me the source so I can check myself?)

    Thank you

  • Alex Perotti 53 posts 94 karma points
    Mar 16, 2015 @ 18:12
    Alex Perotti
    1

    I solved this.

    It seems that loadJs doesn't set the attributes.

    assetsService.loadJs("https://www.dropbox.com/static/api/2/dropins.js", null, { "data-app-key": $scope.model.config.apiKey, "id": "dropboxjs" }).then(function () {
            // dropin loaded
            $scope.loaded = true;
        });
    

    With this mod to the controller it's working fine:

    assetsService.loadJs("https://www.dropbox.com/static/api/2/dropins.js", null, { "data-app-key": $scope.model.config.apiKey, "id": "dropboxjs" }).then(function () {
            // dropin loaded            
            this.Dropbox.appKey = $scope.model.config.apiKey;
            $scope.loaded = true;
        });
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies