summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/collective/dms/batchimport/fileimporter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/collective/dms/batchimport/fileimporter.py b/src/collective/dms/batchimport/fileimporter.py
index 6745807..2a62af9 100644
--- a/src/collective/dms/batchimport/fileimporter.py
+++ b/src/collective/dms/batchimport/fileimporter.py
@@ -29,6 +29,7 @@ class IImportFileFormSchema(form.Schema):
location = schema.Text(required=False)
owner = schema.Text(required=False)
treating_group = schema.Text(required=False)
+ keywords = schema.Text(required=False) # comma separated identifiers
class ImportFileForm(form.SchemaForm):
@@ -72,9 +73,13 @@ class ImportFileForm(form.SchemaForm):
owner = data['owner']
treating_group = data['treating_group']
folder = self.get_folder(data['location'])
+ keywords = set([x.strip() for x in data['keywords'].split(',')])
document_id = self.convertTitleToId(data.get('title') or os.path.splitext(filename)[0])
utils.createDocument(self, folder, portal_type, document_id,
filename, data['file'], owner, treating_group=treating_group,
- metadata={'title': data.get('title')})
+ metadata={
+ 'title': data.get('title'),
+ 'keywords': keywords,
+ })