I am building a Node.js application that utilizes Storj as file storage. Recently was thinking that it would be useful to have the ability to be notified about bucket changes. So that I can update my local copy of it. I could not find any topics or docs about that feature. I would like to discuss any options or best practices for checking if remote file/folder has been updated.
Welcome to the forum!
Seems only check date time, because object cannot be updated, it can be only replaced, so timestamp will change on object’s creation.
Thus remember the timestamp of the last check and requests all objects newer than this remembered timestamp.
However, this method would not allow to detect server-side moves, because it would be just relink.
So, you likely would remember the objects tree and their modification time, then compare. Or use md5 checksums, but it would work only for S3 protocol without actual download and it will be slower, because we do not store these checksums in the Metadata (but you may do so during upload).