You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ACD: store modified date (modtime) in object metadata #371
it seems at least by default rclone/amazon's own products will result in every file on the cloud drive having it's date modified data set to the date uploaded.
This is basically useless for sorting anything, since the date I choose to sync is pretty arbitrary but the date I create/edit my local files often has important meaning in terms of the order I want things stored.
is this something rclone has control over? or something entirely the doing of ACD?
If I do a restore from ACD to my computer for example my date created will end up being the date I did the download from ACD and date modified will be the date I uploaded to ACD in the first place... neither will be the date I originally created/edited the original file before uploading it. If I'm going to use ACD as another harddrive it'd be nice if it treated my files like my real harddrives do, and not edit the metadata when I re-organize things.
As you can see there is a possibility of setting the date in additional metadata on the object. This wouldn't show in the ACD web interface but would enable rclone to save and restore the modified date.
I'll mark this ticket as an enhancement to implement that feature.
changed the title [-]is there anyway to make rclone store my computer's file's original date modified data for ACD?[/-][+]ACD: store modified date in object metadata[/+]on Feb 25, 2016
@felixbuenemann do you fancy working out how the official client manages to store the modification time? There isn't a documented API for it... To be most useful to rclone you'd need to be able to set the modification time (patch an existing object).
The next best idea I can think of is to use a label - say "Date: " which can be uploaded and patched.
@ncw Do you have any concrete data that the official client does store modification time? I noticed that the node metadata contains both a createdDate and modifiedDate in ISO 8601 format, however I think these mark the time a node was created or modified in the ACD node database.
If I use the automatic folder sync of the current mac client neither original file modification times are stored during upload nor is the creation or modification date from the node's metadata restored on download.
I did try and delete (aka "move-to-trash" a node) and then restore it and that caused the node's modifiedDate to be updated.
However looking at the docs for the REST API list the field contentDate inside the contentProperties hash of a node's metadata, which is listed as:
date extracted from media types (images and videos) (ISO8601 date with timezone offset), # over-writable
Given the comment overwritable this could likely be abused to store the modification time.
I tried to create a node with custom contendDate inside the metadata and this worked, however the contentProperties of existing files can not be modified using a PATCH request.
If you want to be able to change the stored file modification time of existing nodes your best bet is probably to use app specific properties, which can be specified both during node creation and patched later.
This will however be application specific, because the key in the properties hash is the appid and you cannot modify another apps properties.
If you want the data to be interoperable between different clients like acd_cli and rclone than using a label like "DATE:2016-12-16T17:51:38.046Z" would work, as you suggested above.
@felixbuenemann So is it now possible to preserve the timestamps? I am using the last version of rclone and it is still deleting all the original timestamps...
Activity
ncw commentedon Feb 25, 2016
As far as I know it isn't possible to set the modified date via the public API. Some storage systems can and some can't - see the table here
http://rclone.org/overview/
Here is a thread on the developers forum about setting modified date
https://forums.developer.amazon.com/forums/thread.jspa?threadID=8762&tstart=0
As you can see there is a possibility of setting the date in additional metadata on the object. This wouldn't show in the ACD web interface but would enable rclone to save and restore the modified date.
I'll mark this ticket as an enhancement to implement that feature.
[-]is there anyway to make rclone store my computer's file's original date modified data for ACD?[/-][+]ACD: store modified date in object metadata[/+]left1000 commentedon Feb 25, 2016
thanks for the quick response!
lsching17 commentedon Sep 14, 2016
There is a pulling request on acd_cli on implementing modification time support, and the modification time is stored in xattr, will this help?
yadayada/acd_cli@db9f9b0
[-]ACD: store modified date in object metadata[/-][+]ACD: store modified date (modtime) in object metadata[/+]ncw commentedon Dec 16, 2016
@felixbuenemann do you fancy working out how the official client manages to store the modification time? There isn't a documented API for it... To be most useful to rclone you'd need to be able to set the modification time (patch an existing object).
The next best idea I can think of is to use a label - say "Date: " which can be uploaded and patched.
felixbuenemann commentedon Dec 16, 2016
@ncw Do you have any concrete data that the official client does store modification time? I noticed that the node metadata contains both a
createdDateandmodifiedDatein ISO 8601 format, however I think these mark the time a node was created or modified in the ACD node database.If I use the automatic folder sync of the current mac client neither original file modification times are stored during upload nor is the creation or modification date from the node's metadata restored on download.
I did try and delete (aka "move-to-trash" a node) and then restore it and that caused the node's modifiedDate to be updated.
However looking at the docs for the REST API list the field
contentDateinside thecontentPropertieshash of a node's metadata, which is listed as:Given the comment overwritable this could likely be abused to store the modification time.
I tried to create a node with custom
contendDateinside the metadata and this worked, however the contentProperties of existing files can not be modified using a PATCH request.If you want to be able to change the stored file modification time of existing nodes your best bet is probably to use app specific properties, which can be specified both during node creation and patched later.
Example:
This will however be application specific, because the key in the properties hash is the appid and you cannot modify another apps properties.
If you want the data to be interoperable between different clients like acd_cli and rclone than using a label like
"DATE:2016-12-16T17:51:38.046Z"would work, as you suggested above.pedrosimao commentedon Jan 6, 2017
@felixbuenemann So is it now possible to preserve the timestamps? I am using the last version of rclone and it is still deleting all the original timestamps...
felixbuenemann commentedon Jan 11, 2017
@pedrosimao No, I just wrote how it could be implemented.
pedrosimao commentedon Jan 12, 2017
@felixbuenemann So, any idea why it is still not implemented?
ajkis commentedon Jan 15, 2017
Hopefully soon :)
ncw commentedon Jan 14, 2020
I'm going to close this since rclone no longer has any ACD keys and Amazon aren't issuing new ones.