How to get the image file attributes

I’m loading an image file with THREE.TextureLoader
How can I get the file attributes such as the file creation time and last modification time?

Thanks

To make it short: This is not possible. Read the following answer at stackoverflow for more information:

1 Like

In my case I first load the file (and then create an object url which is then being used by TextureLoader)
So I guess I can use the File properties?
For example File last Modified to get the last modifcation time attribute?
Thanks

Um, I don’t think so. As mentioned at stackoverflow, all meta-data of the file are kept at the server. The response from the server is just a copy without those information. For good reasons. A client should not know when files at the server were modified or created.

Oh, but I load the files from local storage (using input file) :slight_smile:

Oh, I see. Have you tried to access the meta-data then? Does it work?

1 Like

I assume you are referring to the File API, i.e. get the file attributes like Blob.size, File.lastModified, File.name ?

Thanks,

p.s.

  • I also see this (although the link mentions that this is an experimental technology, and not supported on all browsers)

  • In case of image files I use exif-js to read some attributes (Not all image files include attributes e.g. modification time)

1 Like