codyswanner / Meme-Cataloger

Learning ReactJS and Django while building something that I want to use
1 stars 1 forks source link

Image Last-Modified info #104

Open codyswanner opened 1 month ago

codyswanner commented 1 month ago

When images are uploaded, is it possible to get information from the uploading device about created date and last-modified date?

If no, does Django have a way of accessing local last-modified information to sort images that way, after being uploaded?

codyswanner commented 3 weeks ago

Django will almost certainly not be able to access that information directly on the system -- the browser is sandboxed for good reasons. Not sure if that metadata can be passed/requested on upload... I'm skeptical, but this would be very cool if it is possible.

codyswanner commented 2 days ago

Something that will certainly be available is the timestamp of the upload to the app. Django may be tracking this already and I just need to ask for it, but even if not, it wouldn't be hard to add a field on the Image model for this. That said, I'm torn between the question of "is this useful" and the idea that if it's going to be useful, it needs to be a little more sophisticated than a string of digits indicating a time of upload. Does SQL have a date class that can be used for queries? Does Django? If it's possible to chunk images up by month (or year, or day, depending on the case) then that could be very useful, but it would require SQL or Django to have enough awareness of the system to query by it.

This needs more investigation.