public boolean anyFileIsRepeated(boolean checkOnlyUploadedFiles) { if (!multiple && avoidRepeatedFiles) { for (String s : fileInput.getFilenames()) { if (fileDone.contains(s) || (!checkOnlyUploadedFiles && fileUploading.contains(s))) return true; } } return false; }
/** * Called when the uploader detects that the upload process has finished: - in the case of submit * complete. - in the case of error talking with the server. */ private void uploadFinished() { removeFromQueue(); finished = true; uploading = false; updateStatusTimer.cancel(); statusWidget.setVisible(false); if (successful) { if (avoidRepeatedFiles) { fileDone.addAll(fileInput.getFilenames()); statusWidget.setStatus(IUploadStatus.Status.SUCCESS); } else { statusWidget.setStatus(IUploadStatus.Status.SUCCESS); } } else if (canceled) { statusWidget.setStatus(IUploadStatus.Status.CANCELED); } else { statusWidget.setStatus(IUploadStatus.Status.ERROR); } onFinishUpload(); reatachIframe(uploadForm.getElement().getAttribute("target")); }
/* (non-Javadoc) * @see gwtupload.client.IUploader#getFileNames() */ public List<String> getFileNames() { return fileInput.getFilenames(); }