Hello,
There seems to be an odd bug in the Dropbox API whereby if you try to download a plain text file containing nothing but a period, you receive a "Restricted Content" error and it refuses to download. One of our customers came across this after she had deleted content from a text file in our writing app but had left the full stop in by mistake.
Reproduction steps:
- I'm using the Objective-C API (API 2).
1. Upload a plain text UTF-8 file containing nothing other than a period (.) character.
2. Using the API, set up a download task:
DBDownloadUrlTask *downloadTask = [self.dropboxClient.filesRoutes downloadUrl:dropboxPathToPlainTextFile overwrite:YES destination:pathToSaveLocally];
[downloadTask setResponseBlock:^(id result, id taskError, DBRequestError *genericError, NSURL *destinationURL){
if (result == nil && genericError != nil)
{
NSLog (@%@", genericError, nil);
NSLog (@taskError, nil);
}
}];
Expected result: the file should download without problem - it's not restricted but is just a plain text file containing a period.
Result: "Restricted content" error:
{
".tag" = path;
path = {
".tag" = "restricted_content";
};
}
DropboxHttpError[{
ErrorContent = "path/restricted_content/";
RequestId = c4ac89c1b2bc6ad61c7255c1ef94a287;
StatusCode = 409;
UserMessage = nil;
}];
Thanks!