Fix Unix timestamps on client during import

File API gives timestamp in milliseconds, not seconds, so this converts
it on the client-side and sends it the correct time to the server.

Ref T609
This commit is contained in:
Matt Baer 2020-01-14 12:26:02 -05:00
parent 65e2e5126b
commit 3e97625cca

View file

@ -48,7 +48,7 @@
const files = e.target.files; const files = e.target.files;
let dateMap = {}; let dateMap = {};
for (let file of files) { for (let file of files) {
dateMap[file.name] = file.lastModified; dateMap[file.name] = file.lastModified / 1000;
} }
fileDates.value = JSON.stringify(dateMap); fileDates.value = JSON.stringify(dateMap);
}) })