Forum Discussion

bspindia's avatar
bspindia
Helpful | Level 7
4 years ago

saver

is it possible

programatically click save directly to path using saver without clicking save button

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    No, there isn't a way to fully automate the Dropbox Saver, but if you want to perform save operations like that programmatically, you can use the /2/files/save_url API endpoint instead.

     

    That's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints.

  • bspindia's avatar
    bspindia
    Helpful | Level 7
    4 years ago
    failed to load request error on clicking save in dropbox popup window
    i tried to save objectURL
    please assist
    code
     
    $("#fileInput").change(function(){
       let file = this.files[0];
       let image = new Image();
       image.src = webkitURL.createObjectURL(file);
       image.onload = function(){
          let cvs = document.createElement("canvas");
          cvs.width = image.naturalWidth;cvs.height = image.naturalHeight;
          cvs.getContext('2d').drawImage(image,0,0,);
          cvs.toBlob(function(blob){
             let dBimg = new Image();dBimg.src = webkitURL.createObjectURL(blob);
             dBimg.onload = function(){
                Dropbox.save(dBimg.src,'2.webp',options);
             }
          },'image/webp',0.8)
       }
    })
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    The Dropbox Saver unfortunately does not officially support data/blob/object URIs like that, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!