0

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) {}
     }
}

新しいリビジョンが初めて作成されます。もう一度実行すると、別の新しいリビジョンが作成されません。

4

0 に答える 0