Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

last modified date not updated on parent directories #14

Open
DevSchmidtchen opened this issue Dec 11, 2020 · 3 comments
Open

last modified date not updated on parent directories #14

DevSchmidtchen opened this issue Dec 11, 2020 · 3 comments

Comments

@DevSchmidtchen
Copy link
Contributor

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
Copy link
Contributor

janrenz commented Dec 11, 2020

Shouldn't we go directly
For the long term solution

@DevSchmidtchen
Copy link
Contributor Author

DevSchmidtchen commented Dec 11, 2020

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
Copy link
Contributor Author

hpi-schul-cloud/schulcloud-server#2102 implements the long term solution (preliminary solution was implemented in branch feature/nextcloud-integration)

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

No branches or pull requests

2 participants