# Timestamp of file upload

**URL:** <https://www.ruby-forum.com/t/timestamp-of-file-upload/142214>\
**Category:** Rails\
**Created:** [July 4, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/timestamp-of-file-upload/142214 "2008-07-04T17:29:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iain\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/6bbea6/32.png) [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Post date:** [July 4, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/timestamp-of-file-upload/142214/1 "2008-07-04T17:29:52Z")

</div>

Hello,

Does anyone know if it possible to find the last modified time of a  
file that has just been uploaded.  
I.e. I save a file on my computer at Friday 4th July 1.40pm. I then  
upload this file 1 hour later. I have tried

File.mtime(photo.path)

but this only returns the timestamp of when the file was saved as a  
temp file (i.e. 2.40pm). Is it possible to find the original last  
modified time (1.40pm)

Hope someone can help

Thanks

Iain
