wuhou_个人页

个人头像照片 wuhou
个人头像照片
0
2
0

个人介绍

暂无个人介绍

擅长的技术

  • Linux
  • 数据库
获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

暂时未有相关云产品技术能力~

阿里云技能认证

详细说明
暂无更多信息
正在加载, 请稍后...
暂无更多信息
  • 提交了问题 2015-06-15

    用OSSFile上传照片,回调了onSuccess,但实际文件没有上传成功

  • 回答了问题 2015-06-15

    用OSSFile上传照片,回调了onSuccess,但实际文件没有上传成功

    Re用OSSFile上传照片,回调了onSuccess,但实际文件没有上传成功     public void doUploadFile(String path, String filename, final boolean isCallBack) throws Exception {         OSSFile ossFile = new OSSFile(sampleBucket, filename);         ossFile.setUploadFilePath(path + filename, 'image/jpg');         ossFile.enableUploadCheckMd5sum();// 开启上传md5校验         if (isCallBack) {             Message myMessage = new Message();             myMessage.what = 3;             myMessage.obj = 0;             handler.sendMessage(myMessage);         }         ossFile.uploadInBackground(new SaveCallback() {             @Override             public void onProgress(String arg0, int arg1, int arg2) {                 if (isCallBack) {                     Message myMessage = new Message();                     myMessage.what = 1;                     myMessage.obj = (int) ((double) arg1 / (double) arg2 * 100);                     handler.sendMessage(myMessage);                 }             }             @Override             public void onFailure(String arg0, OSSException arg1) {                 Message myMessage = new Message();                 myMessage.what = 4;                 myMessage.obj = 100;                 handler.sendMessage(myMessage);             }             @Override             public void onSuccess(String arg0) {                 if (ImageFunction.checkUrlFile(Variable.aliyuncs_url + CacheData.appInfo.getBucketName() + '/' + arg0)) {                     if (isCallBack) {                         Message myMessage = new Message();                         myMessage.what = 2;                         myMessage.obj = 100;                         handler.sendMessage(myMessage);                     }                 } else {                     Message myMessage = new Message();                     myMessage.what = 4;                     myMessage.obj = 100;                     handler.sendMessage(myMessage);                 }             }         });     }     private Handler handler = new Handler() {         @Override         public void handleMessage(Message msg) {             int position = (Integer) msg.obj;             int what = (Integer) msg.what;             if ((what == 1) && (updateProgress != null)) {                 updateProgress.refreashProgress(position);             } else if ((what == 2) && (updateProgress != null)) {                 updateProgress.sendSuccess();             } else if ((what == 3) && (updateProgress != null)) {                 updateProgress.startUpload();             } else if ((what == 4) && (updateProgress != null)) {                 updateProgress.sendError();             }         }     };     public void setUpdateProgress(sendPhotoProgressInterfacer updateProgress) {         this.updateProgress = updateProgress;     }
    踩0 评论1
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息