protected void checkFileSize(long receivedLength) { if (receivedLength > maxFileSize) { interrupt(); notificationManager.showWarningNotification( Messages.UPLOAD_FAILED, Messages.UPLOAD_LIMIT, maxFileSize / 1024 + "kb"); } }
protected void checkMimeType(String mimeType) { if (acceptedMimeTypes != null && !acceptedMimeTypes.contains(mimeType)) { interrupt(); notificationManager.showWarningNotification( Messages.UPLOAD_FAILED, Messages.UPLOAD_INVALID_MIMETYPE, StringUtil.toReadableString(acceptedMimeTypes)); } }