Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto upload created and modified date get set to upload date/time #256

Open
tzapu opened this issue Jun 3, 2017 · 37 comments
Open

auto upload created and modified date get set to upload date/time #256

tzapu opened this issue Jun 3, 2017 · 37 comments
Labels

Comments

@tzapu
Copy link

tzapu commented Jun 3, 2017

while manual upload seems to preserve created and modified

for me at least it would feel natural to have auto upload preserve dates as well

cheers

@marinofaggiana
Copy link
Member

Hi @tzapu ... where is the issue ? I don't understand

@tzapu
Copy link
Author

tzapu commented Jun 5, 2017

hi,
i would expect all my files to keep their created and modified time/date
it messes up all file views based on created/modified, it also seems really odd that some upload methods preserve those file attributes while others change them..
also, most of my files appear under today in the ios app after being uploaded, although they strech a few years. seems non intuitive at all.

@tzapu
Copy link
Author

tzapu commented Jun 21, 2017

hello,

will this be considered or how it is now is how it will remain?

cheers

@tzapu
Copy link
Author

tzapu commented Jun 23, 2017

@marinofaggiana any chance you could chime in on this? sorry to keep pestering you about it, but at least to me it is something that stops me uploading all the family pics

thank you very much for everything

@tzapu
Copy link
Author

tzapu commented Jun 29, 2017

screenshot 2017-06-29 14 47 30

a 2012 photo should really not show up as created today

@marinofaggiana
Copy link
Member

marinofaggiana commented Jun 29, 2017

mmm .. @jancborchardt .. for you ? now the file name is detect from creationDate of record on Photo, this date derive from EXIF or iOS creation on your memory ...

@mario Android ? as it does ?

@tzapu
Copy link
Author

tzapu commented Jun 29, 2017

a couple of examples:

  • dropbox camera upload for instance preserves created/modified
  • macOS Image Capture app preserves dates

@marinofaggiana
Copy link
Member

as we (preserve on FileName)

@tzapu
Copy link
Author

tzapu commented Jun 29, 2017

yes, filename is ok, but dropbox and all preserve mtime and ctime as well

dropbox camera upload folder
screenshot 2017-06-29 16 14 32

which makes sense to me
thanks

@marinofaggiana
Copy link
Member

sorry but this is not a iOS problem ...

@mario
Copy link
Contributor

mario commented Jun 29, 2017

You can set last modified time however ...

@tzapu
Copy link
Author

tzapu commented Jun 29, 2017

@marinofaggiana should i report this to main nextcloud repo then? thanks
@mario i m not sure i understand what i need to do

@mario
Copy link
Contributor

mario commented Jun 29, 2017

@tzapu was talking to @marinofaggiana :)

@tzapu
Copy link
Author

tzapu commented Jul 17, 2017

guys, sorry to keep pushing this
is it being considered? do i need to post it somewhere else? what do i need to do to make this happen?
am i flogging a dead horse? 😄

cheers

@enoch85
Copy link
Member

enoch85 commented Jul 23, 2017

#313 Related.

@enoch85 enoch85 added the bug label Jul 23, 2017
@alexhass
Copy link

alexhass commented Jul 29, 2017

The issue seems only half fixed. I have seen all images seem to have the correct date, but all mp4 files have the upload date. Client is 2.17.5 on iphone.

@tzapu
Copy link
Author

tzapu commented Aug 18, 2017

i've just tried again with 2.17.6.00008 and modified/created are still set to current time/date

@binarybucks
Copy link

Same issue here I've been using version 2.18.0 over a longer period (e.g. vacation) without internet access. Once the device was back to a location with Wifi all files were uploaded and named with the current date. Hence, all photos are now named incorrectly and completely out of order.

Files uploaded should be named after the date taken. I don't see case were the upload date is of any relevance.

@marinofaggiana
Copy link
Member

@binarybucks the filename take the creationDate of Asset ... why is incorrectly ?

@mario
Copy link
Contributor

mario commented Oct 3, 2017

@marinofaggiana can you tell me where uploads happen? I can fix this, at least for mtime and ctime preservation.

@marinofaggiana
Copy link
Member

NSString *fileName = [CCUtility createFileName:[asset valueForKey:@"filename"] fileDate:asset.creationDate fileType:asset.mediaType keyFileName:k_keyFileNameAutoUploadMask keyFileNameType:k_keyFileNameAutoUploadType];

@mario
Copy link
Contributor

mario commented Oct 3, 2017

@marinofaggiana I don't care much about this. What I'm asking is where is the PUT method for uploading the file itself? I need to set a header then the MTime will be preserved. Also, for filedate I'd use modifiedDate since creationDate isn't always reliable.

@marinofaggiana
Copy link
Member

hahah moment ! and this is the put for URLSession Upload

- (void)uploadURLSession:(NSString *)fileName fileNamePrint:(NSString *)fileNamePrint serverUrl:(NSString *)serverUrl sessionID:(NSString*)sessionID session:(NSString *)session taskStatus:(NSInteger)taskStatus assetLocalIdentifier:(NSString *)assetLocalIdentifier cryptated:(BOOL)cryptated onlyPlist:(BOOL)onlyPlist selector:(NSString *)selector

@mario mario mentioned this issue Oct 3, 2017
@mario
Copy link
Contributor

mario commented Oct 3, 2017

@marinofaggiana fix could be here, please test :)

#388

@alexhass
Copy link

alexhass commented Oct 4, 2017

The question is more, why are you changing the file name from iphone. Why not uploading as is? Date is inside meta data and the file date should also be correct. Renaming the file is not needed.

@binarybucks
Copy link

@marinofaggiana you're right, they're indeed named correctly after the date they were taken. The gallery view in the app just sorted them wrong.

@marinofaggiana
Copy link
Member

ok @mario the Header works but remember :

long dateFileCreation = [asset.creationDate timeIntervalSince1970];

witkout * 1000

Thanks

@romaindutartre
Copy link

Pleaaase merge this, I’m switching from Dropbox and this issue is a big no-go for me and I think other people too :(

@marinofaggiana
Copy link
Member

marinofaggiana commented Jan 29, 2018

@LuckyLuke75 this issue is already fixed.... where you are problem ?

@tzapu
Copy link
Author

tzapu commented Jan 29, 2018

hi, in what version, last i tested, some time ago using the beta version in october, it wasn't ...

@romaindutartre
Copy link

@marinofaggiana Any update ?

@marinofaggiana
Copy link
Member

marinofaggiana commented Feb 7, 2018

2.19.1 (I think ... ) @LuckyLuke75 update ?

@romaindutartre
Copy link

I've checked 2.19.3 and the bug is still here, maybe it was reintroduced in 2.19.2 ?
@rakekniven could you check this one maybe ?

@invario
Copy link

invario commented Jul 3, 2020

Android v 3.12.1 RC1 and this is happening with files in my Auto upload.

Edit: Apologies just realised this is in IOS section.

@johkoenig
Copy link
Member

This bug is still present in v3.0.7 and it is pretty annoying. Are there any steps planned to fix this soon? I just uploaded 3000 images and the image order on the nextcloud web interface is completely messed up.

@pysiak
Copy link

pysiak commented Sep 23, 2021

Hi, I'm using Nextcloud Liquid for iOS 4.0.6.0 @ 2021 and Nextcloud Server 22.1.1 and I have the same.
I enabled photo upload and it uploads photos from a time span of multiple years from my phone, but they seem to get the date of the moment I upload. So of course it makes sense to upload fresh photos this way, but photos from 2016 shouldn't come up as September 22nd.

@rakekniven
Copy link
Member

rakekniven commented Oct 29, 2021

Hi, I'm using Nextcloud Liquid for iOS 4.0.6.0 @ 2021 and Nextcloud Server 22.1.1 and I have the same. I enabled photo upload and it uploads photos from a time span of multiple years from my phone, but they seem to get the date of the moment I upload. So of course it makes sense to upload fresh photos this way, but photos from 2016 shouldn't come up as September 22nd.

Cannot confirm this.
Which iOS version?
Do the images show the correct shooting date within Apples photo app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.