--- a/src/pyams_file/widget/__init__.py Thu Oct 12 22:21:17 2017 +0200
+++ b/src/pyams_file/widget/__init__.py Thu Oct 12 22:22:44 2017 +0200
@@ -9,7 +9,6 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
-from pyramid.interfaces import IView
__docformat__ = 'restructuredtext'
@@ -17,11 +16,13 @@
# import standard library
import os
from cgi import FieldStorage
+from datetime import datetime
# import interfaces
from pyams_file.interfaces import IFileField, IFileWidget, IImageField, IImageWidget, \
IThumbnailImageWidget, IThumbnailImageField, DELETED_FILE, IThumbnail
from pyams_form.interfaces.form import IFormLayer
+from pyramid.interfaces import IView
from z3c.form.interfaces import NOT_CHANGED, IFieldWidget, IDataConverter
# import packages
@@ -70,6 +71,10 @@
"""File widget"""
@property
+ def timestamp(self):
+ return datetime.utcnow().timestamp()
+
+ @property
def current_value(self):
if self.form.ignoreContext:
return None