diff --git a/Controller/UploadController.php b/Controller/UploadController.php
index ea29e3a74329ce992c666e466bd25d67519a3157..564964ccd5666c8c5be27f08f6bd3a533710ae23 100644
--- a/Controller/UploadController.php
+++ b/Controller/UploadController.php
@@ -66,7 +66,12 @@ class UploadController extends Controller
     {
         $data = $request->request->get('file');
 
-        $file = $this->fileManager->create($data['name'], $data['size'], $data['type'], $data['lastModified']);
+        $file = $this->fileManager->create(
+            $data['name'],
+            $data['size'],
+            $data['type'],
+            isset($data['lastModified']) ? $data['lastModified'] : null
+        );
 
         $token = $this->csrfProvider->generateCsrfToken(self::CSRF_INTENTION);
 
diff --git a/Resources/views/Form/file_upload.html.twig b/Resources/views/Form/file_upload.html.twig
index 53f72846affa86a133413b7c15f9495e452a6f73..8bec7d57a101b3c3b00ea480dd46d4125bc100ab 100644
--- a/Resources/views/Form/file_upload.html.twig
+++ b/Resources/views/Form/file_upload.html.twig
@@ -15,7 +15,7 @@
 {% endblock %}
 
 {% block file_upload_widget %}
-    <div id="{{ id }}" {{ block('widget_container_attributes') }} {{ block('widget_only_attributes') -}}
+    <div id="{{ id }}" {{ block('widget_container_attributes') }} {{ block('widget_only_attributes') }}
          data-download-prototype="{{ block('file_upload_entry_prototype')|e }}"
          data-upload-prototype="{{ block('file_upload_progress_prototype')|e }}"
          {% if disabled %}data-disabled="disabled"{% endif -%}