Closed
Description
Following PRs #2724 and #2666 , the FileUpload.value
traitlet looks like:
[{'name': 'example.csv',
'type': 'text/csv',
'size': 2548,
'lastModified': 1536574751152,
'content': <memory at 0x11d51ab88>}]
It is defined as List(Dict())
.
We could consider the following, in increasing order of complexity:
- change
lastModified
to be a datetime object. We should check browser compatibility on whether it's always expressed as a timestamp. - define a namedtuple or a Python class that exposes the attributes, rather than a dict. This would make the attributes more discoverable.
notifying @jtpio , @jasongrout who have been working on this.