Index: /main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py	(revision 12440)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py	(revision 12441)
@@ -40,4 +40,13 @@
     IPDFDocument, IHTMLDocument, IRESTDocument)
 
+
+@grok.subscribe(IDocument, grok.IObjectRemovedEvent)
+def handle_document_removed(document, event):
+    store = getUtility(IExtFileStore)
+    for filename in document.filenames:
+        store.deleteFileByContext(document, attr=filename)
+    return
+
+
 class Document(grok.Container):
     """This is a document.
@@ -48,4 +57,10 @@
 
     form_fields_interface = None
+
+    # Kofa can store any number of files per Document object.
+    # However, we highly recommend to associate and store
+    # only one file per Document object. Thus the following
+    # tuple should contain only a single filename string.
+    filenames = ()
 
     local_roles = [
@@ -130,4 +145,6 @@
     grok.provides(IPDFDocument)
 
+    filenames = ('sample.pdf',)
+
     form_fields_interface = IPDFDocument
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py	(revision 12440)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py	(revision 12441)
@@ -150,4 +150,11 @@
             'href="http://localhost/app/documents/DOC1/sample.pdf">PDF File</a>'
             in self.browser.contents)
+        # The file can be found in the file system
+        file = getUtility(IExtFileStore).getFileByContext(
+            document, attr='sample.pdf')
+        file_content = file.read()
+        pdf.seek(0)
+        pdf_content = pdf.read()
+        self.assertEqual(file_content, pdf_content)
         # Browsing the link shows a real pdf only if the document
         # has been published
@@ -176,4 +183,9 @@
         self.browser.getControl("Remove selected", index=0).click()
         self.assertTrue('Successfully removed' in self.browser.contents)
+
+        # File has been removed too
+        file = getUtility(IExtFileStore).getFileByContext(
+            document, attr='sample.pdf')
+        self.assertTrue(file is None)
 
         # All actions are being logged
