Open DevSchmidtchen opened 3 years ago
Shouldn't we go directly For the long term solution
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...
https://github.com/hpi-schul-cloud/schulcloud-server/pull/2102 implements the long term solution (preliminary solution was implemented in branch feature/nextcloud-integration
)
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.