Note that there are some explanatory texts on larger screens.

plurals
  1. POBox api edit file
    primarykey
    data
    text
    <p>I trying edit txt file in my iOS app using box-api-2.</p> <p>I trying this code where <code>filedata</code> - NSData with NSString, that should replace file. </p> <pre><code>BoxFilesRequestBuilder *builder = [[BoxFilesRequestBuilder alloc] init]; builder.name = self.previewFile.name; builder.parentID = self.folderID; NSInputStream *inputStream = [NSInputStream inputStreamWithData:fileData]; long long contentLength = [fileData length]; [[BoxSDK sharedSDK].filesManager overwriteFileWithID:self.previewFile.modelID inputStream:inputStream contentLength:contentLength requestBuilder:builder success:^(BoxFile *file) { NSLog(@"Yeahh"); } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSDictionary *JSONDictionary) { NSLog(@"%@", [error description]); }]; RELEASE_SAFELY(builder); </code></pre> <p>But I got an error:</p> <pre><code> Error Domain=com.box.sdk.errordomain Code=405 "The operation couldn’t be completed. (com.box.sdk.errordomain error 405.)" UserInfo=0x1e11b5a0 {com.box.sdk.jsonerrorresponse=&lt;CFBasicHash 0x1e2e0460 [0x3c6e6100]&gt;{type = immutable dict, count = 6, entries =&gt; 0 : &lt;CFString 0x1e04b520 [0x3c6e6100]&gt;{contents = "type"} = &lt;CFString 0x1e2e5340 [0x3c6e6100]&gt;{contents = "error"} 1 : &lt;CFString 0x3c6cfc94 [0x3c6e6100]&gt;{contents = "status"} = &lt;CFNumber 0x1e289df0 [0x3c6e6100]&gt;{value = +405, type = kCFNumberSInt64Type} 2 : &lt;CFString 0x1e2e2ea0 [0x3c6e6100]&gt;{contents = "code"} = &lt;CFString 0x1e2c1620 [0x3c6e6100]&gt;{contents = "method_not_allowed"} 3 : &lt;CFString 0x1e28b140 [0x3c6e6100]&gt;{contents = "help_url"} = &lt;CFString 0x1e2defc0 [0x3c6e6100]&gt;{contents = "http://developers.box.com/docs/#errors"} 4 : &lt;CFString 0x1e2e2dd0 [0x3c6e6100]&gt;{contents = "request_id"} = &lt;CFString 0x1e2e2df0 [0x3c6e6100]&gt;{contents = "417724859526e752ff250a"} 5 : &lt;CFString 0x1e28b160 [0x3c6e6100]&gt;{contents = "message"} = &lt;CFString 0x1e2e2db0 [0x3c6e6100]&gt;{contents = "Method Not Allowed"} } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload