We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

yvancoyaud's avatar
yvancoyaud
Helpful | Level 6
7 years ago

utilisation de l'API filesGetThumbnail

Bonjour, Je suis au début de mes essais du SDK javascript de Dropbox et j'ai le problème suivant: Le contexte : <head> <title>testDropbox</title> <script src="https://unpkg.com/dropbox/di...
  • yvancoyaud's avatar
    yvancoyaud
    7 years ago

    Mille merci, ça fonctionne.

     

    Je remets ci-dessous le code si cela peut servir à d'autres développeurs sous Meteor.

    Dabord :

    $ meteor npm i dropbox -s

     va inclure dans l'environnement du projet Meteor, "dropbox" et "dropbox-sdk"

     

    <head>
      .....
            <script src="https://unpkg.com/dropbox/dist/Dropbox-sdk.min.js"></script>
      .....
    </head>
    
    let dbx = new Dropbox.Dropbox({accessToken:'MY_APP_TOKEN'});
    dbx.filesListFolder({path: ''})
        .then(function(response) {
            console.log(response)
            dbx.filesGetThumbnail({"path": "/IMG90.jpeg"})
                .then(function(response) {
                    var img = document.createElement('img');
                    img.src=window.URL.createObjectURL(response.fileBlob);
                    document.body.appendChild(img);
                })
                .catch(function(error) {
                    console.log("got error:");
                    console.log(error);
                });
    
        })
        .catch(function (error) {
            console.log(error);
        })
    

     

    Voila cette configuration fonctionne pour moi.

     

    Merci encore à Greg K.

    YC

     

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!