<?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: Upload via API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-via-API/m-p/384#M26</link>
    <description>&lt;P&gt;What problem exactly do you encounter? Do you get an error message? I can't offer much help with third party plugins of course, but if you are getting an error from the API I may be able to offer some insight.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Dec 2014 07:04:32 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2014-12-09T07:04:32Z</dc:date>
    <item>
      <title>Upload via API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-via-API/m-p/383#M25</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt;
I just installed a Dropbox Plugin for a social network tool called ELGG which uses the Dropbox API. There seems to be a problem with the upload - so I want to ask you, whether you see an error in the following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; /* Need to be logged in to do this. */
gatekeeper();

/* Get the path. */
$path = get_input('path');

/* Get the file. */
$file = $_FILES['file']['name'];

/* Redirect the user if Cancel is clicked. */
$submit = get_input('submit');
if ($submit == elgg_echo('cancel')) {
    forward('pg/dropbox/root/?path=' . $path);
}

/* Upload file procedure */
try {
    /* Connection to dropbox. */
    $ret = dropbox_connect();
    if ($ret) {
        forward('pg/dropbox/error/?errcode=' . $ret);
    }

    $CONFIG-&amp;gt;dropbox-&amp;gt;putFile($path . '/' . $file, $_FILES['file']['tmp_name']);

    system_message(sprintf(elgg_echo('dropbox:upload:uploaded'), $file));
    forward('pg/dropbox/root/?path=' . $path);
} catch (Dropbox_Exception_NotFound $e) {
    register_error(elgg_echo('dropbox:notfound'));
    forward($_SERVER['HTTP_REFERER']);
} catch(Dropbox_Exception_Forbidden $e) {
    register_error(elgg_echo('dropbox:forbidden'));
    forward('pg/dropbox/root/?path=' . $path);
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for help!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:47:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-via-API/m-p/383#M25</guid>
      <dc:creator>Paul W.</dc:creator>
      <dc:date>2019-05-29T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Upload via API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-via-API/m-p/384#M26</link>
      <description>&lt;P&gt;What problem exactly do you encounter? Do you get an error message? I can't offer much help with third party plugins of course, but if you are getting an error from the API I may be able to offer some insight.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 07:04:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-via-API/m-p/384#M26</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2014-12-09T07:04:32Z</dc:date>
    </item>
  </channel>
</rss>

