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

Question about about mwdblib and hooks. #1013

Open
dyussekeyev opened this issue Jan 8, 2025 · 1 comment
Open

Question about about mwdblib and hooks. #1013

dyussekeyev opened this issue Jan 8, 2025 · 1 comment
Labels
type:question Further information is requested

Comments

@dyussekeyev
Copy link

dyussekeyev commented Jan 8, 2025

Hi, team. My question is about mwdblib and hooks.

If I use mwdb.upload_file() function to upload the file using REST API, will it trigger the on_created_object()/on_created_file()/other hooks?

@psrok1
Copy link
Member

psrok1 commented Jan 9, 2025

Yes, it should trigger:

  • on_created_object() and on_created_file() for new file
  • on_reuploaded_object() and on_reuploaded_file() when file already exists

Unfortunately as I check the code, current hook system isn't very consistent in terms of on_created_tag because on_created_tag is triggered for each tag but only for new files. I will create an issue for that (edit: #1015)

@psrok1 psrok1 added type:bug Something isn't working type:question Further information is requested and removed type:bug Something isn't working labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants