mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Make uploads work with WMF wikis
They use HTTP/1.0, so no HTTP Chunked Transfer. Took me a fucklong to actually find that out - almost 5 hours as I chased wrong leads, looked for bugs in the HTTP libs, battled poor network, etc. But was relatively easy to spot once I started logging HTTP requests. Now, if only Java had a decent documentation browser...
This commit is contained in:
parent
c5fd1e8fd1
commit
d7ad63ad38
3 changed files with 12 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import org.w3c.dom.Document;
|
|||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -80,6 +81,7 @@ public class ShareActivity extends Activity {
|
|||
// return str;
|
||||
return result.getString("/api/upload/@result");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return "Failure";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue