2013-09-29 91 views

回答

0

下面是使用jQuery,更新稱爲status HTML元素一個簡單的例子:

client.getDatastoreManager().openDefaultDatastore(function (error, datastore) { 
    ... 

    $('#status').text('Synchronized'); 
    datastore.syncStatusChanged.addListener(function() { 
     $('#status').text(
      datastore.getSyncStatus().uploading 
      ? 'Pending...' 
      : 'Synchronized' 
     ); 
    }); 

    ... 
+0

不應該有下載過的情況下? –

+0

不是我看到,沒有:https://www.dropbox.com/developers/datastore/docs/js#Dropbox.Datastore.getSyncStatus。 – smarx

+0

貝。動態SDK在其同步狀態中有更多細節。我猜,雖然數據正在下載,但應用程序卻無法響應。 :-) –