Closed sebdeleze closed 1 year ago
When trying to subscribe to download hook, for instance in https://github.com/inveniosoftware/invenio-stats/blob/master/invenio_stats/receivers.py#L52, the event is not triggered, as the sender is not the app.
It would be better to pass the sender when the event is fired, as it was done before v1.0.5 (https://github.com/inveniosoftware/invenio-files-rest/commit/f309ca0e506c8aff8141abc6a715134353d4b66b#diff-438fa464815046f99b08cc785585af65dca7361613e8e9754ea9e743b10fb22eL660).
In addition, the signal for download event must be sent only if the query param download is set.
download
Of course, this has to be done for all hooks (download, upload, delete).
When trying to subscribe to download hook, for instance in https://github.com/inveniosoftware/invenio-stats/blob/master/invenio_stats/receivers.py#L52, the event is not triggered, as the sender is not the app.
It would be better to pass the sender when the event is fired, as it was done before v1.0.5 (https://github.com/inveniosoftware/invenio-files-rest/commit/f309ca0e506c8aff8141abc6a715134353d4b66b#diff-438fa464815046f99b08cc785585af65dca7361613e8e9754ea9e743b10fb22eL660).
In addition, the signal for download event must be sent only if the query param
download
is set.Of course, this has to be done for all hooks (download, upload, delete).