Exemplo n.º 1
0
 public void startUpload() {
   if (upload.getStats().isInProgress()) {
     return;
   }
   numFiles = upload.getStats().getFilesQueued();
   totalSize = 0L;
   bytesUploaded = 0L;
   for (int i = 0; i < numFiles; i++) {
     totalSize += upload.getFile(i).getSize();
   }
   updateUrl();
   upload.startUpload();
 }
Exemplo n.º 2
0
 private void updateUrl() {
   final String uploadUrl =
       GWT.getHostPageBaseURL()
           + "fileupload;jsessionid="
           + session.getSessionId()
           + "?end="
           + totalSize
           + "&start="
           + bytesUploaded
           + "&clientId="
           + clientId
           + "&lastUpload="
           + ((filesUploaded + 1) == numFiles);
   upload.setUploadURL(uploadUrl);
 }