Answer the question
In order to leave comments, you need to log in
Is there a working example of Yandex.Disk WebDAV implementation on Android, for files larger than 1 mb?
There is such a function implemented using JackRabbit:
client = new HttpClient();
credentials = new UsernamePasswordCredentials(username, password);
client.getState().setCredentials(AuthScope.ANY, credentials);
method = new PutMethod("https://webdav.yandex.ru/myfolder/myfile.jpg");
File f = new File(fileToUpload);
RequestEntity requestEntity = new FileRequestEntity (
f , "image/jpeg");
((PutMethod) method).setRequestEntity(requestEntity);
if (f.length() > 100000) {
((PutMethod) method).setContentChunked(true);
}
client.executeMethod(method);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question