kishvanchee edited a comment on issue #9145:
URL: https://github.com/apache/airflow/issues/9145#issuecomment-705167120
Should I be using `SlackHook` only for file uploads while at the moment the
operator is using `SlackWebhookHook` ?
Docstring for SlackWebhookHook says
> :param attachments: The attachments to send on Slack. Should be a list of
dictionaries representing Slack attachments.
:type attachments: list
This is confusing to me since I can attach list of dictionaries, but not
file objects.
While for SlackHook I can find a suitable call method which actually does
the file upload.
https://github.com/apache/airflow/blob/d404cb06dd52d391a9ef26ef700b61f04a771cd5/airflow/providers/slack/hooks/slack.py#L85
[This stackoverflow answer](https://stackoverflow.com/a/36287627/5675288)
says that I can't use a webhook, but must use an api for file upload. The
WebClient is what is actually being used in the `SlackAPIFileOperator` too.
https://github.com/apache/airflow/blob/fe59f2622337616fe1902bb6d7e1bce6f002ffa8/airflow/providers/slack/operators/slack.py#L159
@jeffryMAC any thoughts?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]