List of usage examples for com.vaadin.client.ui.dd VHtml5File getName
public final native String getName() ;
From source file:com.wcs.wcslib.vaadin.widget.multifileupload.client.VCustomUpload.java
License:Apache License
private boolean isValidFileSize(VHtml5File file) { if (file.getSize() > maxFileSize || file.getSize() <= 0) { String formattedErrorMsg = UploadClientUtil.getSizeErrorMessage(sizeErrorMsg, maxFileSize, file.getSize(), file.getName()); VNotification.createNotification(1000, client.getUIConnector().getWidget()).show(formattedErrorMsg, VNotification.CENTERED, "warning"); return false; }//w w w . j av a 2 s . c o m return true; }
From source file:com.wcs.wcslib.vaadin.widget.multifileupload.client.VCustomUpload.java
License:Apache License
private boolean isValidMimeType(VHtml5File file) { if (acceptedMimeTypes != null && !acceptedMimeTypes.isEmpty() && !acceptedMimeTypes.contains(file.getType())) { String formattedErrorMsg = UploadClientUtil.getMimeTypeErrorMessage(mimeTypeErrorMsg, file.getName()); VNotification.createNotification(1000, client.getUIConnector().getWidget()).show(formattedErrorMsg, VNotification.CENTERED, "warning"); return false; }/*from ww w . j a v a 2 s. com*/ return true; }
From source file:com.wcs.wcslib.vaadin.widget.multifileupload.client.VMultiUpload.java
License:Apache License
private boolean isValidFileSize(VHtml5File file, StringBuilder errorMsg) { if (file.getSize() > maxFileSize || file.getSize() <= 0) { String formattedErrorMsg = UploadClientUtil.getSizeErrorMessage(sizeErrorMsg, maxFileSize, file.getSize(), file.getName()); errorMsg.append(formattedErrorMsg).append("<br/>"); return false; }//from w ww .j a v a 2 s. c om return true; }
From source file:com.wcs.wcslib.vaadin.widget.multifileupload.client.VMultiUpload.java
License:Apache License
private boolean isValidMimeType(VHtml5File file, StringBuilder errorMsg) { if (acceptedMimeTypes != null && !acceptedMimeTypes.isEmpty() && !acceptedMimeTypes.contains(file.getType())) { String formattedErrorMsg = UploadClientUtil.getMimeTypeErrorMessage(mimeTypeErrorMsg, file.getName()); errorMsg.append(formattedErrorMsg).append("<br/>"); return false; }/*w ww. j a va2s .c o m*/ return true; }