Hi
I read the forum here, many answer to related questions point to discontinued stackoverflow documentation.
Specific question: How can I resume uploading a large file using the obj-c V2 API.
I am currently uploading as shown below.
The DBUploadTask has "cancel" and "resume" selectors. But how can these be persisted?
Should I use another upload method?
Is there any sample-code?
Thanks
Wouter
DBUploadTask *thisTask = [[[client.filesRoutes uploadUrl:remotePath
mode:[[DBFILESWriteMode alloc] initWithOverwrite]
autorename:@(NO)
clientModified:nil
mute:nil
propertyGroups:nil
inputUrl:localFilePath]
setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *error)
{
if (result)
{
// finished successfully
}
else {
id theError = routeError ? routeError : error;
DebugError( @%@", theError);
}
}]
setProgressBlock:^(int64_t bytesDownloaded, int64_t totalBytesDownloaded, int64_t totalBytesExpectedToDownload) {
DebugLog(@\nDownloaded: %.02f KB\nTotal done: %.02f KB\nTotal expected: %02.f KB\n, (CGFloat)bytesDownloaded/1024.0f, (CGFloat)totalBytesDownloaded/1024.0f, (CGFloat)totalBytesExpectedToDownload/1024.0f);
}
];