Image is not upload from android?
Hi,
HashMap config = new HashMap();
config.put("cloud_name", "****");
config.put("api_key", "*************");
config.put("api_secret", "******************");
Cloudinary cloudinary = new Cloudinary(config);
Case-1:
JSONObject cloudinaryResult = new JSONObject(cloudinary.uploader().upload(filePath, ObjectUtils.emptyMap()));
Case-2:
JSONObject cloudinaryResult = new JSONObject(cloudinary.uploader().unsignedUpload(filePath,"mgksra",ObjectUtils.emptyMap()));
I have done both above cases, but not working.
Even It not showing any error.
Plssss help....
Thanks
-
Hi,
Sorry for the very late reply, we have noticed that this request was left unattended. I guess this is not relevant anymore but for future reference -Both cases seem correct.
I believe that the problem is with Android -
The upload call requires server communication. Android usually doesn't allow it to happen on the main (UI) thread.
You can try to wrap the upload call with an AsyncTask. That way, the upload call takes place on a different thread.
If that doesn't help, please open a ticket and share more details and we'll try to investigate it further.0
Post is closed for comments.
Comments
1 comment