From 8a47d49e531cf812dbc19a4a7a328caf76c24414 Mon Sep 17 00:00:00 2001 From: Paul Heijman Date: Mon, 27 May 2024 11:42:53 +0200 Subject: [PATCH] add lastmodified to form data --- src/FileUpload.vue | 1 + src/chunk/ChunkUploadHandler.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FileUpload.vue b/src/FileUpload.vue index 1c0efff..c58e467 100644 --- a/src/FileUpload.vue +++ b/src/FileUpload.vue @@ -1044,6 +1044,7 @@ export default defineComponent({ form.append(key, value) } } + form.append('lastModified', Math.round(file.file.lastModified / 1000)) // Moved file.name as the first option to set the filename of the uploaded file, since file.name // contains the full (relative) path of the file not just the filename as in file.file.filename diff --git a/src/chunk/ChunkUploadHandler.js b/src/chunk/ChunkUploadHandler.js index eac959c..36080d3 100644 --- a/src/chunk/ChunkUploadHandler.js +++ b/src/chunk/ChunkUploadHandler.js @@ -348,7 +348,8 @@ export default class ChunkUploadHandler { url: this.action, body: Object.assign(this.finishBody, { phase: 'finish', - session_id: this.sessionId + session_id: this.sessionId, + lastModified: Math.round(this.file.file.lastModified / 1000) }) }).then(res => { this.file.response = res