<?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 problems uploading text files iOS in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/244849#M13829</link>
    <description>&lt;P&gt;Hi everbody,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in order to upgrade my app to Dropbox 2 I was trying upload and download festures.&lt;/P&gt;
&lt;P&gt;While download seems to work I have some problems with uploading.&lt;/P&gt;
&lt;P&gt;I am working with textual file with a small size, maximum 1 MB.&lt;/P&gt;
&lt;P&gt;I followed the tutorial but after the upload is finished I only see on dropbox an empty small file of about 190 byte. It seems it is not able to upload the content of the file. Here is my code where db is the path of the file to upload. Thanks very much or the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NSData *fileData = [db dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
NSString *pathToSave = [[_startDirectory stringByAppendingString:@"/"] stringByAppendingString:file];
[[[userClient.filesRoutes uploadData:pathToSave mode:mode autorename:@(YES) clientModified:nil mute:@(NO) inputData:fileData]&amp;nbsp;
setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
if (result) {
NSLog(@"result:%@\n", result);}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n%@\n", routeError, networkError);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"progress:\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }];&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2020 15:54:50 GMT</pubDate>
    <dc:creator>Giordano58</dc:creator>
    <dc:date>2020-11-13T15:54:50Z</dc:date>
    <item>
      <title>problems uploading text files iOS</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/244849#M13829</link>
      <description>&lt;P&gt;Hi everbody,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in order to upgrade my app to Dropbox 2 I was trying upload and download festures.&lt;/P&gt;
&lt;P&gt;While download seems to work I have some problems with uploading.&lt;/P&gt;
&lt;P&gt;I am working with textual file with a small size, maximum 1 MB.&lt;/P&gt;
&lt;P&gt;I followed the tutorial but after the upload is finished I only see on dropbox an empty small file of about 190 byte. It seems it is not able to upload the content of the file. Here is my code where db is the path of the file to upload. Thanks very much or the help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NSData *fileData = [db dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
NSString *pathToSave = [[_startDirectory stringByAppendingString:@"/"] stringByAppendingString:file];
[[[userClient.filesRoutes uploadData:pathToSave mode:mode autorename:@(YES) clientModified:nil mute:@(NO) inputData:fileData]&amp;nbsp;
setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
if (result) {
NSLog(@"result:%@\n", result);}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n%@\n", routeError, networkError);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"progress:\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }];&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 15:54:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/244849#M13829</guid>
      <dc:creator>Giordano58</dc:creator>
      <dc:date>2020-11-13T15:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: problems uploading text files iOS</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/244923#M13847</link>
      <description>I can't see what `db` is in your code, but the rest of the code doesn't look obviously wrong. To troubleshoot this, can you first check whether or not `fileData` has the expected length when calling `uploadData`?</description>
      <pubDate>Tue, 03 Oct 2017 16:16:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/244923#M13847</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-10-03T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: problems uploading text files iOS</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/245093#M13873</link>
      <description>&lt;P&gt;Hi Greg, thanks for the answer but I solved the problem making use of the following method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;userClient&lt;SPAN&gt;.&lt;/SPAN&gt;filesRoutes &lt;SPAN&gt;uploadUrl&lt;/SPAN&gt;&lt;SPAN&gt;:pathToSave &lt;/SPAN&gt;&lt;SPAN&gt;inputUrl&lt;/SPAN&gt;&lt;SPAN&gt;:db]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again and regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Giordano&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 08:02:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/problems-uploading-text-files-iOS/m-p/245093#M13873</guid>
      <dc:creator>Giordano58</dc:creator>
      <dc:date>2017-10-04T08:02:12Z</dc:date>
    </item>
  </channel>
</rss>

