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

Forum Discussion

dwWithCat's avatar
dwWithCat
Explorer | Level 3
6 months ago

Saver does not upload image file to dropbox, only opens the image in new tab.

Trying to use Saver on Instagram files. If I use the API like this:

 

 

 

fetch("/api/dropboxupload", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          url: YOUR_FILE_URL,
          filename: YOUR_FILE_NAME,
          accessToken: accessToken.DropboxToken,
        }),
      })

 

 

 

I am successful. If I uninstall Dropbox from my node app and use Saver like this:

 

 

 

      <a
        href={YOUR_FILE_URL}
        data-filename={YOUR_FILE_NAME}
        className="dropbox-saver dropbox-dropin-btn dropbox-dropin-default"
      >
        Save to Dropbox2
      </a>

 

 

 

All that happens is that the image opens in a new tab in the browser.

 

Popups are allowed in both Safari and Chrome for dropbox.com.

 

 

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Your first code snippet shows you POSTing some information to your server, not directly to the Dropbox API, so it's unclear what that does. Presumably you then have code that calls the /2/files/save_url Dropbox API endpoint. That offers essentially the same functionality as the Dropbox Saver, but using a different interface.

     

    For your second code snippet, where you're trying to use the Dropbox Saver, I see you're setting an attribute "className" but that should actually be "class" as documented here. By the way, you shouldn't set "dropbox-dropin-btn" and "dropbox-dropin-default" yourself; the Dropbox Saver script will do that automatically.

     

    Also, make sure you have the script tag loaded as covered in the Setup section of the documentation.

    • dwWithCat's avatar
      dwWithCat
      Explorer | Level 3
      The first snippet succeeds. It’s code from my api Endpoint. The second snippet is my Saver anchor tag with the same data as in the first snippet. The url is a link to an Instagram image. The only difference that I can see between the data in the two snippets is the access token in the api method
      • dwWithCat's avatar
        dwWithCat
        Explorer | Level 3
        Gemini AI said that Saver won’t upload an image file from a url, that it has to be a file located on my machine