Index: main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7122)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/student.py	(revision 7123)
@@ -231,6 +231,4 @@
         """
         ext = os.path.splitext(filename)[1].lower()
-        if ext not in ['.jpg', '.png']:
-            raise ValueError('Only .jpg and .png allowed')
         # call super method to ensure that any old files with
         # different filename extension are deleted.
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7122)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7123)
@@ -364,5 +364,5 @@
         # No birth certificate has been uploaded yet
         # Browsing the link shows a placerholder image
-        self.browser.open('birth_certificate.jpg')
+        self.browser.open('birth_certificate')
         self.assertEqual(
             self.browser.headers['content-type'], 'image/jpeg')
@@ -378,5 +378,5 @@
         self.browser.getControl("Save (no upload)").click() # submit form
         self.assertFalse(
-            '<a target="image" href="birth_certificate.jpg">'
+            '<a target="image" href="birth_certificate">'
             in self.browser.contents)
         # ... but the correct upload submit button does
@@ -389,9 +389,9 @@
         # There is a correct <img> link included
         self.assertTrue(
-            '<a target="image" href="birth_certificate.jpg">'
+            '<a target="image" href="birth_certificate">'
             in self.browser.contents)
 
         # Browsing the link shows a real image
-        self.browser.open('birth_certificate.jpg')
+        self.browser.open('birth_certificate')
         self.assertEqual(
             self.browser.headers['content-type'], 'image/jpeg')
@@ -428,10 +428,10 @@
         self.browser.getControl(
             name='upload_birthcertificateuploadmanage').click()
-        self.assertTrue('.jpg file extension expected' in self.browser.contents)
+        self.assertTrue('Only the following extension are allowed'
+            in self.browser.contents)
         # Managers can delete files
         self.browser.getControl(name='delete_birthcertificateuploadmanage').click()
         self.assertTrue(
-            'File birth_certificate.jpg deleted'
-            in self.browser.contents)
+            'birth_certificate deleted' in self.browser.contents)
         # Managers can add and delete second file
         self.browser.open(self.edit_clearance_student_path)
@@ -443,5 +443,5 @@
             name='upload_acceptanceletteruploadmanage').click()
         self.assertFalse(
-            '<a target="image" href="acceptance_letter.jpg">'
+            '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
         ctrl = self.browser.getControl(name='acceptanceletteruploadmanage')
@@ -451,10 +451,28 @@
             name='upload_acceptanceletteruploadmanage').click()
         self.assertTrue(
-            '<a target="image" href="acceptance_letter.jpg">'
+            '<a target="image" href="acceptance_letter">'
             in self.browser.contents)
         self.browser.getControl(
             name='delete_acceptanceletteruploadmanage').click()
         self.assertTrue(
-            'File acceptance_letter.jpg deleted'
+            'acceptance_letter deleted'
+            in self.browser.contents)
+        # Managers can upload a file via the StudentBaseManageFormPage
+        self.browser.open(self.manage_student_path)
+        pseudo_image = StringIO('I pretend to be a graphics file')
+        ctrl = self.browser.getControl(name='passportuploadmanage')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_photo.bmp')
+        self.browser.getControl(
+            name='upload_passportuploadmanage').click()
+        self.assertTrue('jpg file extension expected'
+            in self.browser.contents)
+        ctrl = self.browser.getControl(name='passportuploadmanage')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(pseudo_image, filename='my_photo.jpg')
+        self.browser.getControl(
+            name='upload_passportuploadmanage').click()
+        self.assertTrue(
+            '<img align="middle" height="125px" src="passport.jpg" />'
             in self.browser.contents)
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7122)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7123)
@@ -16,4 +16,6 @@
 grok.templatedir('browser_templates')
 
+ALLOWED_FILE_EXTENSIONS = ('jpg', 'png', 'pdf', 'tif')
+
 class StudentManageSidebar(grok.ViewletManager):
     grok.name('left_studentmanage')
@@ -202,5 +204,5 @@
     store.deleteFileByContext(context, attr=download_name)
     write_log_message(view, 'deleted: %s' % download_name)
-    view.flash('File %s deleted.' % download_name)
+    view.flash('%s deleted.' % download_name)
     return
 
@@ -223,7 +225,16 @@
     dummy, ext = os.path.splitext(upload.filename)
     ext.lower()
-    if ext != expected_ext:
-        view.flash('%s file extension expected.' % expected_ext)
-        return False
+    if expected_ext:
+        if ext != expected_ext:
+            view.flash('%s file extension expected.' %
+                expected_ext.replace('.',''))
+            return False
+    else:
+        if not ext.replace('.','') in ALLOWED_FILE_EXTENSIONS:
+            view.flash(
+                'Only the following extension are allowed: %s' %
+                ', '.join(ALLOWED_FILE_EXTENSIONS))
+            return False
+        download_name += ext
     size = file_size(upload)
     if size > max_size:
@@ -341,5 +352,5 @@
     grok.order(1)
     label = u'Birth Certificate:'
-    download_name = u'birth_certificate.jpg'
+    download_name = u'birth_certificate'
 
 class BirthCertificateUploadManage(FileUpload):
@@ -347,7 +358,7 @@
     """
     grok.order(1)
-    label = u'Birth Certificate (jpg only):'
+    label = u'Birth Certificate:'
     mus = 1024 * 150
-    download_name = u'birth_certificate.jpg'
+    download_name = u'birth_certificate'
 
 class AcceptanceLetterDisplay(FileDisplay):
@@ -356,5 +367,5 @@
     grok.order(1)
     label = u'Acceptance Letter:'
-    download_name = u'acceptance_letter.jpg'
+    download_name = u'acceptance_letter'
 
 class AcceptanceLetterUploadManage(FileUpload):
@@ -362,7 +373,7 @@
     """
     grok.order(2)
-    label = u'Acceptance Letter (jpg only):'
+    label = u'Acceptance Letter:'
     mus = 1024 * 150
-    download_name = u'acceptance_letter.jpg'
+    download_name = u'acceptance_letter'
 
 class BirthCertificateUploadEdit(BirthCertificateUploadManage):
@@ -390,10 +401,17 @@
         image = getUtility(IExtFileStore).getFileByContext(
             self.context, attr=self.download_name)
-        # We expect that image is a jpeg pictures
-        self.response.setHeader(
-            'Content-Type', 'image/jpeg')
         if image is None:
             # show placeholder image
+            self.response.setHeader('Content-Type', 'image/jpeg')
             return open(DEFAULT_IMAGE_PATH, 'rb').read()
+        dummy,ext = os.path.splitext(image.name)
+        if ext == '.jpg':
+            self.response.setHeader('Content-Type', 'image/jpeg')
+        elif ext == '.png':
+            self.response.setHeader('Content-Type', 'image/png')
+        elif ext == '.pdf':
+            self.response.setHeader('Content-Type', 'application/pdf')
+        elif ext == '.tif':
+            self.response.setHeader('Content-Type', 'image/tiff')
         return image
 
@@ -408,10 +426,10 @@
     """Renders birth certificate jpeg scan.
     """
-    grok.name('birth_certificate.jpg')
-    download_name = u'birth_certificate.jpg'
+    grok.name('birth_certificate')
+    download_name = u'birth_certificate'
 
 class AcceptanceLetterImage(Image):
     """Renders acceptance letter jpeg scan.
     """
-    grok.name('acceptance_letter.jpg')
-    download_name = u'acceptance_letter.jpg'
+    grok.name('acceptance_letter')
+    download_name = u'acceptance_letter'
