Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7080)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7081)
@@ -58,4 +58,5 @@
 from waeup.sirp.permissions import get_users_with_local_roles
 from waeup.sirp.university.interfaces import ICertificate
+from waeup.sirp.utils.helpers import string_from_bytes, file_size
 from waeup.sirp.widgets.datewidget import (
     FriendlyDateWidget, FriendlyDateDisplayWidget)
@@ -67,5 +68,5 @@
     IApplicant, IApplicantPrincipal,IApplicantEdit, IApplicantsRoot,
     IApplicantsContainer, IApplicantsContainerAdd, application_types_vocab,
-    IMAGE_PATH,
+    IMAGE_PATH, MAX_UPLOAD_SIZE,
     )
 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED
@@ -695,12 +696,22 @@
     target = 'edit_full'
 
-def handle_img_upload(upload, context):
+
+def handle_img_upload(upload, context, view):
     """Handle upload of applicant image.
-    """
+
+    Returns `True` in case of success or `False`.
+
+    Please note that file pointer passed in (`upload`) most probably
+    points to end of file when leaving this function.
+    """
+    size = file_size(upload)
+    if size > MAX_UPLOAD_SIZE:
+        view.flash('Uploaded image is too big!')
+        return False
+    upload.seek(0) # file pointer moved when determining size
     store = getUtility(IExtFileStore)
     file_id = IFileStoreNameChooser(context).chooseName()
     store.createFile(file_id, upload)
-    upload.seek(0) # XXX: really neccessary?
-    return
+    return True
 
 class EditApplicantFull(WAeUPEditFormPage):
@@ -720,9 +731,9 @@
         super(EditApplicantFull, self).update()
         self.wf_info = IWorkflowInfo(self.context)
+        self.max_upload_size = string_from_bytes(MAX_UPLOAD_SIZE)
         upload = self.request.form.get('form.passport', None)
         if upload:
             # We got a fresh upload
-            handle_img_upload(upload, self.context)
-            self.passport_changed = True
+            passport_changed = handle_img_upload(upload, self.context, self)
         return
 
@@ -789,9 +800,4 @@
             return
         datepicker.need() # Enable jQuery datepicker in date fields.
-        upload = self.request.form.get('form.passport', None)
-        if upload:
-            # We got a fresh upload
-            handle_img_upload(upload, self.context)
-            self.passport_changed = True
         super(EditApplicantStudent, self).update()
         return
