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