上传Dropbox中文件的新分区

我想使用android api在Dropbox中添加对文档(Test.doc)的修订。 我试过了

    FileInputStream inputStream = null;
try {                    
     DropboxInputStream temp = mDBApi.getFileStream("/Test.doc", null);
     String revision = temp.getFileInfo().getMetadata().rev;
     Log.d("REVISION : ",revision);

     File file = new File("/sdcard0/renamed.doc");
     inputStream = new FileInputStream(file);                    
     Entry newEntry = mDBApi.putFile("/Test.doc", inputStream, file.length(), revision, new ProgressListener() {

    @Override
    public void onProgress(long arg0, long arg1) {
         Log.d("","Uploading.. "+arg0+", Total : "+arg1);
    }
});

 } catch (Exception e) {
     System.out.println("Something went wrong: " + e);
 } finally {
     if (inputStream != null) {
         try {
             inputStream.close();
         } catch (IOException e) {}
     }
}

首次执行时,会创建新版本。 但是当第二次执行相同的代码时,修订版本正在创建。 请帮我解决这个问题。

链接地址: http://www.djcxy.com/p/69077.html

上一篇: Uploading new resisions for files in dropbox

下一篇: Do I need a Dropbox app to upload files to my own Dropbox?