hpi-schul-cloud / webdav

POC/MVP to have SC files available via WebDav
1 stars 0 forks source link

last modified date not updated on parent directories #14

Open DevSchmidtchen opened 3 years ago

DevSchmidtchen commented 3 years ago

Problem: When a file gets updated and changes its updatedAt-timestamp, this update doesn't get reflected on the parent directories.

Why is this a problem? The NextCloud integration uses this timestamp for its so called ETag which determines whether files needs to be synchronised again or if everything is up to date, meaning the resources are not getting updated until the timestamp has changed.

Expected behaviour Every parent directory should update its updatedAt-timestamp if child resource gets updated.

Preliminary solution Update parent folders with WebDAV-client every time a file is changed.

Long term solution Integrate this functionality into SC-Server updating its parent directories every time the files-endpoint is called.

janrenz commented 3 years ago

Shouldn't we go directly For the long term solution

DevSchmidtchen commented 3 years ago

Shouldn't we go directly For the long term solution

Theoretically yes, but local integration is really easy and is done with a few lines of code whereas server integration needs some 'planning' because until now it only uses Mongoose and doesn't update anything else besides the FileModel. So we would need to add some logic there and I am not quite sure how this integrated with Mongoose...

DevSchmidtchen commented 3 years ago

https://github.com/hpi-schul-cloud/schulcloud-server/pull/2102 implements the long term solution (preliminary solution was implemented in branch feature/nextcloud-integration)