七牛云上传图片闪退的问题,增加网络配置Http可以请求
This commit is contained in:
@@ -54,14 +54,29 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
public void complete(String key, ResponseInfo info, JSONObject response) {
|
||||
System.out.println("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
||||
//L.e("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null));
|
||||
try {
|
||||
/* try {
|
||||
assert response != null;
|
||||
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
||||
} catch (JSONException e) {
|
||||
// throw new RuntimeException(e);
|
||||
L.e(e);
|
||||
return;
|
||||
}*/
|
||||
|
||||
if (response == null) {
|
||||
// Handle the null case, e.g., log an error, throw a specific exception, etc.
|
||||
L.e("Response is null");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
||||
} catch (JSONException e) {
|
||||
L.e(e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (mList == null || mList.size() == 0) {
|
||||
if (mUploadCallback != null) {
|
||||
mUploadCallback.onFinish(mList, false);
|
||||
|
||||
Reference in New Issue
Block a user