Upload Image Response Issue in android
When i upload multiple image at same time than it returns same response.
i am using tag concept on it
String tag = "source=Profile";
String requestId = MediaManager.get().upload(path)
.unsigned("sample_app_preset")
.option("tags", tag)
.constrain(TimeWindow.immediate())
.callback(new UploadCallback() {
@Override
public void onStart(String requestId) {
Log.d("onStart",requestId);
// your code here
}
@Override
public void onProgress(String requestId, long bytes, long totalBytes) {
// example code starts here
Double progress = (double) bytes / totalBytes;
// post progress to app UI (e.g. progress bar, notification)
// example code ends here
}
@Override
public void onSuccess(String requestId, Map resultData) {
// your code here
Log.d("onSuccess",requestId);
if (resultData != null && resultData.size() > 0) {
if (resultData.containsKey("url")) {
String imageURL = (String) resultData.get("url");
String cloudinaryID = (String) resultData.get("public_id");
int width = (Integer) resultData.get("width");
int height = (Integer) resultData.get("height");
if (imageURL != null && !StringUtils.isEmpty(imageURL)) {
//logic here
}
}
}
}
@Override
public void onError(String requestId, ErrorInfo error) {
// your code here
}
@Override
public void onReschedule(String requestId, ErrorInfo error) {
// your code here
}
})
.dispatch();
}
all things is working fine now , image also upload on cludinary web portal but it return same result at multiple time
that mean if we upload 3 image than
same url retruns at 3 times in response
0
-
Hi Himanshu Agarwal,
I'm very sorry for the late response.
Thank you for notifying us about this issue, our dev team will fix that ASAP.
Best,
Yair
0 -
I am still struggling with this problem. please look in to it.
0 -
Hi Karan,
This issue has been resolved since version 1.23.0, please make sure you are using the latest version of our SDK.
Please update, and let me know if it works for you.
Best,
Yakir
0
Post is closed for comments.
Comments
3 comments