<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BUG - Direct link to files created via /media API call return a corrupt URL! in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113882#M3333</link>
    <description>&lt;P&gt;Thanks! It sounds pretty likely you ran in to the same (or a similar) issue then, since the link you have works.&lt;/P&gt;

&lt;P&gt;How exactly were you testing it though? E.g., were you manually copying and pasting it into your browser or something, or did you click it from your terminal?&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2015 02:47:40 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2015-06-30T02:47:40Z</dc:date>
    <item>
      <title>BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113877#M3328</link>
      <description>&lt;P&gt;I noticed that direct links generated via the /media API are currently returning a corrupt URL. Not all file formats seem to be affected, but I can reproduce the issue for PDF and Office files. &lt;BR /&gt;
According to the documentation, the returned JSON should look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "url": "https://dl.dropboxusercontent.com/1/view/abcdefghijk/example",
    "expires": "Fri, 16 Sep 2011 01:01:25 +0000"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, currently the following JSON is returned:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "url": "https://api-content.dropbox.com/1/files/auto/abcdefghijk/example.pdf?signature=1.uJpbEgcWOjAIBQ..1435610003.qbYUOzANtu_33g6uv6dJy0JcV9tjp-oF8nQCci_h2Mg",
    "expires": "Fri, 16 Sep 2011 01:01:25 +0000"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The url however is invalid and give the following error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"error": "Signature did not match. STRING_TO_SIGN was u'1\\nuJpbEgcWOjAIBQ\\n\\n1435610160\\napi-content.dropbox.com\\nGET\\n/1/files/auto/abcdefghijk/example.pdf'"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has something changed in the API or is it a (quite severe) bug. If the /media call has changed, where can I find more information about this? &lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:41:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113877#M3328</guid>
      <dc:creator>De L.1</dc:creator>
      <dc:date>2019-05-29T09:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113878#M3329</link>
      <description>&lt;P&gt;Moved to API forum.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 23:55:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113878#M3329</guid>
      <dc:creator>Rich</dc:creator>
      <dc:date>2015-06-29T23:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113879#M3330</link>
      <description>&lt;P&gt;Thanks for the report. We're looking into it.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 00:40:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113879#M3330</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T00:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113880#M3331</link>
      <description>&lt;P&gt;We've disabled this change for the time being. To help us investigate, can you copy an actual sample of where/how you tried to access the returned URL? Can you check if an extra ' or %27 was added at the end? (I encountered the same issue where my terminal included the ' from the end of the quoted string in the JSON when opening the URL in my browser, for example.)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 01:00:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113880#M3331</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T01:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113881#M3332</link>
      <description>&lt;P&gt;Thanks for your quick reply! Unfortunately I don't have the actual JSON response anymore, the only link I still could find is the following:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://api-content.dropbox.com/1/files/auto/Test%20Out-of-the-Box/%C3%89tonne%C3%AEz.docx?signature=1.uJpbEgcWOjAIBQ..1435610702.N8XYasB2hZ6nElVLSL5A5LnzBZp5SBo9gehuiejgJtc" rel="nofollow noreferrer"&gt;https://api-content.dropbox.com/1/files/auto/Test%20Out-of-the-Box/%C3%89tonne%C3%AEz.docx?signature=1.uJpbEgcWOjAIBQ..1435610702.N8XYasB2hZ6nElVLSL5A5LnzBZp5SBo9gehuiejgJtc&lt;/A&gt; (which just works now...)&lt;/P&gt;

&lt;P&gt;Which I received by calling &lt;CODE&gt;createTemporaryDirectLink($file)&lt;/CODE&gt; in Client.php (PHP SDK 1.1.5) call. There seems to be no extra ' or %27 in the URL.&lt;BR /&gt;
I am not sure if this is the information where you are looking for, if not just let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 01:51:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113881#M3332</guid>
      <dc:creator>De L.1</dc:creator>
      <dc:date>2015-06-30T01:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113882#M3333</link>
      <description>&lt;P&gt;Thanks! It sounds pretty likely you ran in to the same (or a similar) issue then, since the link you have works.&lt;/P&gt;

&lt;P&gt;How exactly were you testing it though? E.g., were you manually copying and pasting it into your browser or something, or did you click it from your terminal?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 02:47:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113882#M3333</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T02:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113883#M3334</link>
      <description>&lt;P&gt;My app just does the API call and redirects the user to the URL from the JSON response. Noting fancy actually...&lt;/P&gt;

&lt;P&gt;However, I also noticed that it isn't possible to the ?raw=1 or ?dl=1 (render a file or force a Save as) parameter in those new URLs via the old /media URLs.  Is that true?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 03:18:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113883#M3334</guid>
      <dc:creator>De L.1</dc:creator>
      <dc:date>2015-06-30T03:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113884#M3335</link>
      <description>&lt;P&gt;For the most part, the &lt;A href="https://www.dropbox.com/help/201" rel="nofollow noreferrer"&gt;dl and raw parameters&lt;/A&gt; aren't meant for the /view links to begin with, since the /view links already return the content directly. Those parameters are really meant for &lt;A href="http://www.dropbox.com/s/" rel="nofollow noreferrer"&gt;www.dropbox.com/s/&lt;/A&gt; which go to a preview page by default. I think the only difference is the Content-Disposition header, which isn't currently configurable with the new format. Is that behavior relevant in your app?&lt;/P&gt;

&lt;P&gt;Ok, since the change we've enabled/disabled didn't affect the returned links themselves, just whether or not you get the new format, and since your link itself does work, it sounds like it was just something like what I described. That being the case, we're re-enabling this for your account. Please give it another try and let me know if you can reproduce it and how you do so. Thanks in advance! &lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 03:36:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113884#M3335</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T03:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113885#M3336</link>
      <description>&lt;P&gt;Thanks for your answer. It's a little bit late here, so I think I mixed things up... The issue was indeed caused by the addition of ?raw=1 to the new URL... &lt;/P&gt;

&lt;P&gt;However, I am still having issues. The following link doesn't do anything for me in Chrome(43) and IE(11):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;https://api-content.dropbox.com/1/files/auto/Test%20Out-of-the-Box/Getting%20Started.pdf?signature=1.uJpbEgcWOjAIBQ..1435625123.JlvQfjBKXW-mc41a4Xfp9pGYfOwqptbQtPjQB-jvayA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I look into the Chrome Console, I get the following errors:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;1) [Report Only] Refused to apply inline style because it violates the following Content Security Policy directive: "default-src *". Either the 'unsafe-inline' keyword, a hash ('sha256-1kQs8h_ra9YlH-s6eZbKdSD_cn6Ljcz2Rv60pJnk_eY='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.&lt;BR /&gt;
2) Error in event handler for runtime.onMessage: SecurityError: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Besides that, it indeed creates an issue for me. My app wants to download (for example) files via a Save As dialog directly via a short lived url. Until now, I called /media to receive a temporarily link to the file in the form of &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;https://dl.dropboxusercontent.com/1/view/e9bvl1qlepzw8vd/Example%20Out-of-the-Box/__TESTFILE__.txt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I could change that into &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;https://www.dropbox.com/s/e9bvl1qlepzw8vd/Example%20Out-of-the-Box/__TESTFILE__.txt?dl=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to force a save as dialog.&lt;/P&gt;

&lt;P&gt;However, with the new URL that isn't possible anymore. It is possible that I used the API in the wrong way in the past, but how should I do it properly?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 04:18:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113885#M3336</guid>
      <dc:creator>De L.1</dc:creator>
      <dc:date>2015-06-30T04:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113886#M3337</link>
      <description>&lt;P&gt;Thanks! Just adding ?raw=1 would do the same thing in the new format, since it already has parameters added with a ?. You should instead parse the URL in order to add a parameter.&lt;/P&gt;

&lt;P&gt;Anyway, thanks for the new details. We're disabling this for you now and will investigate potential solutions.&lt;/P&gt;

&lt;P&gt;Also, the links from &lt;A href="https://www.dropbox.com/developers/core/docs#media" rel="nofollow noreferrer"&gt;/media&lt;/A&gt; weren't really meant for use in the browser. If you want /s links anyway though, you can use &lt;A href="https://www.dropbox.com/developers/core/docs#shares" rel="nofollow noreferrer"&gt;/shares&lt;/A&gt; instead, and those links respect the raw and dl parameters. Those aren't short-lived though. It sounds like what you ideally want is a way for the user of a web app to be able to download a file from the Dropbox account directly in their browser, without having to pass the data through the app's server. That's not really something the API currently solves well, but we'll consider that a request.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 04:55:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113886#M3337</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T04:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113887#M3338</link>
      <description>&lt;P&gt;I am not sure if this is going off topic, we can also discuss it via email.&lt;/P&gt;

&lt;P&gt;The app I created is a WordPress plugin allowing users to display their Dropbox files directly on a WordPress page without the need of shared links. Users that want to download a file, don't get their hands on a shared link, but instead the short lived url is used to download the file. &lt;/P&gt;

&lt;P&gt;I have the same kind of plugins for Google Drive, Box and OneDrive and their API's all include a (short lived) direct download link to the file. And honestly, I think that it should be part of the Dropbox API as well. I don't see a reason why I should first download files to the apps server via the /files call before I can pass it to the user. It makes more sense to let the user download the file directly via the Dropbox servers.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 15:34:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113887#M3338</guid>
      <dc:creator>De L.1</dc:creator>
      <dc:date>2015-06-30T15:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: BUG - Direct link to files created via /media API call return a corrupt URL!</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113888#M3339</link>
      <description>&lt;P&gt;That's certainly a reasonable request, and I've sent it along to the right people as a feature request.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 22:27:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/BUG-Direct-link-to-files-created-via-media-API-call-return-a/m-p/113888#M3339</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-06-30T22:27:20Z</dc:date>
    </item>
  </channel>
</rss>

