fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
141 stars 29 forks source link

How to get the lastModified value (supported by flow.js)? #112

Open wayneconnolly opened 1 year ago

wayneconnolly commented 1 year ago

Hi, I really love this uploader. Thank-you.

I want to obtain the lastModified value of the file to be uploaded.

It appears to be supported by flow.js attributes here https://github.com/flowjs/flow.js/#methods and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file

The selected files' are returned by the element's HTMLInputElement.files property, which is a FileList object containing a list of file objects. The FileList behaves like an array, so you can check its length property to get the number of selected files.

Each File object contains the following information:

name
The file's name.

lastModified
A number specifying the date and time at which the file was last modified, in milliseconds since the UNIX epoch (January 1, 1970 at midnight).

size
The size of the file in bytes.

type
The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).