<?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 Upload pdf(using swift sdk) is damaged when downloading from dropbox in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-pdf-using-swift-sdk-is-damaged-when-downloading-from/m-p/280843#M17121</link>
    <description>&lt;P&gt;I am&amp;nbsp;following the instructions on&amp;nbsp;&lt;A href="https://github.com/dropbox/SwiftyDropbox#download-style-request" target="_blank"&gt;https://github.com/dropbox/SwiftyDropbox#download-style-request&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and I successfully upload my pdf to dropbox. However the uploaded pdf cannot be previewed and when I download, it shows the following error.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-14 at 14.26.57.png" style="width: 569px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/3554iD786004BDB81CA3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-14 at 14.26.57.png" alt="Screen Shot 2018-06-14 at 14.26.57.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tired to upload the same pdf manually to dropbox. I can preview and when I download it, it is completely correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how I upload my pdf using swift.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-18 at 14.06.03.png" style="width: 683px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/3555iAD4E2CB208BF1D83/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-18 at 14.06.03.png" alt="Screen Shot 2018-06-18 at 14.06.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Appreciate anyone's help! Thank you very much. I have been stuck for a long time&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:12:34 GMT</pubDate>
    <dc:creator>hzy916</dc:creator>
    <dc:date>2019-05-29T09:12:34Z</dc:date>
    <item>
      <title>Upload pdf(using swift sdk) is damaged when downloading from dropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-pdf-using-swift-sdk-is-damaged-when-downloading-from/m-p/280843#M17121</link>
      <description>&lt;P&gt;I am&amp;nbsp;following the instructions on&amp;nbsp;&lt;A href="https://github.com/dropbox/SwiftyDropbox#download-style-request" target="_blank"&gt;https://github.com/dropbox/SwiftyDropbox#download-style-request&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and I successfully upload my pdf to dropbox. However the uploaded pdf cannot be previewed and when I download, it shows the following error.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-14 at 14.26.57.png" style="width: 569px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/3554iD786004BDB81CA3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-14 at 14.26.57.png" alt="Screen Shot 2018-06-14 at 14.26.57.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tired to upload the same pdf manually to dropbox. I can preview and when I download it, it is completely correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how I upload my pdf using swift.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-18 at 14.06.03.png" style="width: 683px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/3555iAD4E2CB208BF1D83/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-18 at 14.06.03.png" alt="Screen Shot 2018-06-18 at 14.06.03.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Appreciate anyone's help! Thank you very much. I have been stuck for a long time&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:12:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-pdf-using-swift-sdk-is-damaged-when-downloading-from/m-p/280843#M17121</guid>
      <dc:creator>hzy916</dc:creator>
      <dc:date>2019-05-29T09:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Upload pdf(using swift sdk) is damaged when downloading from dropbox</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-pdf-using-swift-sdk-is-damaged-when-downloading-from/m-p/280926#M17124</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/715328"&gt;@hzy916&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the issue here is that you're trying to encode the PDF file as if it were text data and not binary data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try creating a URL to the local file path and updating your request to point the 'input' parameter directly to that URL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if that works as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 21:45:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-pdf-using-swift-sdk-is-damaged-when-downloading-from/m-p/280926#M17124</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-06-18T21:45:30Z</dc:date>
    </item>
  </channel>
</rss>

