Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File uploaded event in dataprovider #2882

Merged
merged 11 commits into from
May 18, 2022

Conversation

aduffeck
Copy link
Contributor

This pr fixes a problem with the FileUploaded event which has been emitted too early until now.

The previous code emitted FileUploaded after the InitiateFileUpload call already, which is too early because the file hasn't actually been uploaded yet at that point and isn't available to be statted yet, for example.

The fix is to emit the event from the dataprovider only when the upload has actually finished.

Note: This PR only implements this functionality for the decomposedfs storage driver, other drivers might still need to be adapted.

We previously emitted them after the InitiateFileUpload call which could
lead to the indexer trying to stat the file even though the upload
hadn't been finished yet.
The dataprovider uses this callback to emit the FileUploaded event which
will be picked up by the search indexer, for example.
@aduffeck aduffeck requested review from labkode, ishank011, glpatcern and a team as code owners May 18, 2022 08:58
@update-docs
Copy link

update-docs bot commented May 18, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

Copy link
Contributor

@butonic butonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works in combination with owncloud/ocis#3821

@sonarcloud
Copy link

sonarcloud bot commented May 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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

Successfully merging this pull request may close these issues.

None yet

3 participants