photo / mobile-android

Trovebox mobile application for Android
Apache License 2.0
120 stars 64 forks source link

Uploaded photo should retain its original date/time #424

Open arikfr opened 11 years ago

arikfr commented 11 years ago

When uploading an old photo it should keep its original timestamp, rather than using the timestamp when it was uploaded.

patricksan commented 11 years ago

@arikfr, normally we will not change the original timestamp. That would happens if you use the filter and it should only be in that situation.

How are you uploading this photo? Did you try to use Sync?

arikfr commented 11 years ago

@patricksan I just selected it in the sync tab and clicked next. Can it have something to do with the fact that the photo was generated by Instagram?

patricksan commented 11 years ago

Yes, Instragram removes the metadata from the file. Because of this we need to add a date and we add the actual date.

jmathai commented 11 years ago

Is the actual date even available in this case?

arikfr commented 11 years ago

@patricksan @jmathai can't you check the date the file was created?

patricksan commented 11 years ago

@jmathai the actual date is not available, we add it in the server side.

jmathai commented 11 years ago

@patricksan it can be sent to the upload API as a unix timestamp. I think the parameter is dateTaken but I will confirm. This depends on if we can get the file creation date as @arikfr suggested.

patricksan commented 11 years ago

@arikfr," File Modification Date/Time" is the filesystem mtime for the file. It is not in the Exif.

@jmathai I also agree with @arikfr suggestion but Eugene and I need to investigate. cc @httpdispatch.

I don't wanna file date/time overridden exif information.

The same solution should applies to mobile-ios.

jmathai commented 11 years ago

I don't wanna file date/time overridden exif information.

AGREE! Unless we can always pass dateTaken and fall back to file mtime if it's not in exif.

arikfr commented 11 years ago

I don't wanna file date/time overridden exif information.

I definitely wouldn't want that either. How about using the filesystem time only in the case exif information isn't available?

jmathai commented 11 years ago

I don't wanna file date/time overridden exif information.

I definitely wouldn't want that either. How about using the filesystem time only in the case exif information isn't available?

I was updating my comment to say that :).

It's important to remember the purpose of the app: do what the user expects.

In this case, I think relying on EXIF and falling back to mtime is the best solution.

patricksan commented 11 years ago

ok. EXIF is just metadata(key/value list). I need to know exactly what do you search in the metadata to work with the data. If this date (or these dates) is not present I can use the mtime.

arikfr commented 11 years ago

Maybe it will be more robust just to send the mtime to the server (add a field to the API call) and let the server decide what it wants to use.

This way if in the future the server will use different fields, you won't have to update the client(s).

patricksan commented 11 years ago

That is a good idea. @jmathai?

jmathai commented 11 years ago

You know I'm always hesitant to add fields to the API :). Let me think about it a bit more!

httpdispatch commented 11 years ago

@arikfr, normally we will not change the original timestamp. That would happens if you use the filter and it should only be in that situation.

@patricksan We preserve EXIF information when user edits photos. So nothing should be lost.

@patricksan @jmathai can't you check the date the file was created?

I think we can have only date of file last modified. But i will digg more how to retrieve file date of create.

httpdispatch commented 11 years ago

How i see even android file browsers can show only last modified time image

jmathai commented 11 years ago

Last modified isn't great but is it better?

httpdispatch commented 11 years ago

do you mean better than date of upload?

arikfr commented 11 years ago

Most likely that last modified will be same as created at...

zedascouves commented 11 years ago

Another thing that may be related to this. Whenever I try to upload a photo (unchanged by any filter), the photo is tagged as having been taken on November 2012. If I upload it via the desktop web browser, the date is tagged correctly. Example of incorrect date: https://zedascouves.trovebox.com/p/m0 Example of correct date: https://zedascouves.trovebox.com/photo/m1/view

httpdispatch commented 11 years ago

@zedascouves yes it is weird. I've downloaded image and EXIF data seems to be correct there, but tags and date shown are incorrect. @jmathai do you have any idea why it happens?

jmathai commented 11 years ago

I'm unable to download the originals to test myself. @zedascouves could you make them available?

httpdispatch commented 11 years ago

@jmathai you can test even on thumbs, they have proper exif information

zedascouves commented 11 years ago

Actually... how do I do that? The new theme looks better, but the editing part is basically invisible, as I can't find where to do it. Btw, I have an album which suffers from the same problem: https://zedascouves.trovebox.com/photos/album-o/token-653dda42c5/list.

The difference is that all these photos were uploaded via dropbox's android client (to the "upload" folder), which I think it's not officially supported, but the result is the same.

httpdispatch commented 11 years ago

@zedascouves go to Settings and check "Let visitors download my original hi-res photos" option

zedascouves commented 11 years ago

Ok, done. Thank you @httpdispatch.