Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to post image using HTTP POST multipart. #176

Open
GoogleCodeExporter opened this issue Aug 10, 2015 · 0 comments
Open

Not able to post image using HTTP POST multipart. #176

GoogleCodeExporter opened this issue Aug 10, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I am not able to post an Image to my server. I tried with postman(chrome 
extension) its working on it.

here's my code


AjaxCallback<JSONObject> cb = new AjaxCallback<JSONObject>();
cb.weakHandler(this, "callback");
cb.type(JSONObject.class);
cb.url(apiUrl);     
cb.header("auth", header);

Map<String, Object> params = new HashMap<String, Object>();

filePath = "/storage/sdcard0/IMG_136289526505467.jpeg";
File file = new File(filePath);
AQuery aq = new AQuery(this);
aq.id(R.id.imageView).image(file, 400);

params.put("image_file", file);
params.put("title", "title of the screen");
cb.params(params);

aquery.ajax(cb);


What version of the product are you using? On what operating system?
0.26.7

Am I missing something ?



Original issue reported on code.google.com by [email protected] on 24 Feb 2014 at 7:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant