Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7101)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7102)
@@ -182,6 +182,7 @@
         *Example:*
 
-        For a student with student id ``'A123456'`` and
-        with attr ``'nice_image'`` stored in
+        For a student with student id ``'A123456'``,
+        with attr ``'nice_image'`` and an uploaded file named
+        `'anybasename.JPG'`` to be stored in
         the students container this chooser would create:
 
@@ -194,7 +195,11 @@
 
         """
+        ext = u''
+        if name and name.count('.') == 1:
+            basename, ext = os.path.splitext(name)
+        ext.lower()
         stud_id = self.context.student_id
-        marked_filename = '__%s__%s/%s/%s_%s.jpg' % (
-            STUDENT_FILE_STORE_NAME, stud_id[0], stud_id, attr, stud_id)
+        marked_filename = '__%s__%s/%s/%s_%s%s' % (
+            STUDENT_FILE_STORE_NAME, stud_id[0], stud_id, attr, stud_id, ext)
         return marked_filename
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7101)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7102)
@@ -198,5 +198,5 @@
         return self.view.application_url() + rel_link
 
-def handle_img_upload(upload, context, view, max_size, attr=None):
+def handle_file_upload(upload, context, view, max_size, attr=None):
     """Handle upload of applicant image.
 
@@ -212,5 +212,6 @@
     upload.seek(0) # file pointer moved when determining size
     store = getUtility(IExtFileStore)
-    file_id = IFileStoreNameChooser(context).chooseName(attr=attr)
+    file_id = IFileStoreNameChooser(
+        context).chooseName(attr=attr, name=upload.filename)
     store.createFile(file_id, upload)
     return True
@@ -252,5 +253,5 @@
         if upload:
             # We got a fresh upload
-            file_changed = handle_img_upload(
+            file_changed = handle_file_upload(
                 upload, self.context, self.view, self.mus, self.attr)
             if file_changed is False:  # False is not None!
