opt
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.cloud.tanlu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
@@ -62,24 +63,30 @@ public class CosUpload implements CosStatusCallback {
|
||||
}
|
||||
|
||||
public void uploadInfo(UploadInfo info, ITanluUploadCallback callback) {
|
||||
Log.d(HttpConstant.TANLU, "videoPath = " + info.getFilePath());
|
||||
if (isVideo(info.getFilePath())) {
|
||||
videoCoverImage = getVideoPicPath();
|
||||
Log.d(HttpConstant.TANLU, "videoCoverImage = " + videoCoverImage);
|
||||
boolean isSuccess = getVideoThumbnail(info.getFilePath(), videoCoverImage);
|
||||
Log.d(HttpConstant.TANLU, "isSuccess = " + isSuccess);
|
||||
filePath.add(info.getFilePath());
|
||||
filePath.add(videoCoverImage);
|
||||
} else {
|
||||
videoCoverImage = null;
|
||||
filePath.add(info.getFilePath());
|
||||
}
|
||||
|
||||
Log.e(HttpConstant.TANLU, "filePath.size() = " + filePath.size());
|
||||
CosUploadManagerImpl.getInstance(mContext.getApplicationContext())
|
||||
.upload(filePath, mPicEventId, DbPriorityConfig.PRIORITY_HIGH);
|
||||
mCallback = callback;
|
||||
mUploadInfo = info;
|
||||
|
||||
Log.d(HttpConstant.TANLU, "videoPath = " + info.getFilePath());
|
||||
if (!TextUtils.isEmpty(info.getFilePath())) { //不传路径
|
||||
if (isVideo(info.getFilePath())) {
|
||||
videoCoverImage = getVideoPicPath();
|
||||
Log.d(HttpConstant.TANLU, "videoCoverImage = " + videoCoverImage);
|
||||
boolean isSuccess = getVideoThumbnail(info.getFilePath(), videoCoverImage);
|
||||
Log.d(HttpConstant.TANLU, "isSuccess = " + isSuccess);
|
||||
filePath.add(info.getFilePath());
|
||||
filePath.add(videoCoverImage);
|
||||
} else {
|
||||
videoCoverImage = null;
|
||||
filePath.add(info.getFilePath());
|
||||
}
|
||||
|
||||
Log.e(HttpConstant.TANLU, "filePath.size() = " + filePath.size());
|
||||
CosUploadManagerImpl.getInstance(mContext.getApplicationContext())
|
||||
.upload(filePath, mPicEventId, DbPriorityConfig.PRIORITY_HIGH);
|
||||
} else {
|
||||
//直接上报
|
||||
sendInformation();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user