Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I noticed that for every GB I download to local file system via client.files.download, the app's memory usage increase by that amount. I imagine the Dropbox client doesn't keep the file in memory after it downloads the file, so it must be something that the rest of my app is doing. Can you confirm? Thanks.
Hi James, that certainly would be unexpected and non-ideal, and I'm not aware of any other such reports. If it doesn't seem to be something your app is doing though, we'd be happy to look into it. The version number of the SDK you're using and the relevant code snippet(s) would be useful in that case.
Hi Greg, thanks for the quick response. Here's a gist of what the app tries to do. It downloads an mp3 file and tries to extract its metadata. I'm on 2.0.2 right now. Thanks!
Thanks! We'll look into it.
Hi, We are seeing a similar issue when downloading files from Dropbox using Swifty Dropbox. The memory usage increases gradually to almost 2/3 of the file size by around 1 MB/sec. For example for a file of size 320 MB the memory usage goes from 40 MB (when download started) to 240 MB and stays there until the download is finished:
let destination : (NSURL, NSHTTPURLResponse) -> NSURL = { temporaryURL, response in
let localUrl = NSURL(fileURLWithPath: self.localPath)
return localUrl
}
if let client = Dropbox.authorizedClient {
client.files.download(path: dbPath, destination: destination).response
{
response, error in
if let (metadata, url) = response {
if error != nil {
NSlog("Dropbox download failed. \(error!.description)", .Error)
}
else {
NSlog("Dropbox file downloaded.")
}
}
}
}
Thanks for the additional information sigrem! I don't have an update on this right now, but I'll follow up on this thread when I do.
I also faced the same problem when download from Dropbox the file size increases
Is there any fix for this
Hi Sunil, we looked into this issue on our end and were not able to reproduce it, even in the case of large file downloads. SwiftyDropbox does not handle any memory management -- memory is managed by a third-party networking library, AlamoFire.
You might also want to double check your memory usage levels. Xcode's simulator is known to be unreliable about showing accurate memory usage levels. I would be sure to test memory usage on an actual device as well.
Additionally, we will be distributing a new version of SwiftyDropbox in the next week. I would encourage you to adopt the new version when it is released, as it might address the issue for you as well.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!