Skip to content

Add display_filename parameter to SlackAPIFileOperator#62112

Merged
vincbeck merged 2 commits into
apache:mainfrom
yuseok89:feat/slack-file-operator-add-display-filename
Feb 18, 2026
Merged

Add display_filename parameter to SlackAPIFileOperator#62112
vincbeck merged 2 commits into
apache:mainfrom
yuseok89:feat/slack-file-operator-add-display-filename

Conversation

@yuseok89

@yuseok89 yuseok89 commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Closes #61952

Add display_filename parameter to SlackAPIFileOperator so users can control the file name shown in Slack. Previously, content-only uploads always appeared as "Uploaded file" with no way to customize. This parameter addresses that limitation. Also, it does so without changing the existing file path behavior. This approach was taken because filename is already used as the file path (where to read the file), and reusing it for the display name would break backward compatibility.

Before Screenshot

image

After (4 cases)

Case Screenshot Code
1. file only image SlackAPIFileOperator(
  filename="data/airflow.png",
  ...
)
2. file + display_filename image SlackAPIFileOperator(
  filename="data/airflow.png",
  display_filename="custom_airflow.png",
  ...
)
3. content only image SlackAPIFileOperator(
  content=IMAGE_CONTENT,
  ...
)
4. content + display_filename image SlackAPIFileOperator(
  content=IMAGE_CONTENT,
  display_filename="custom_airflow.png",
  ...
)

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    • Cursor

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@vincbeck
vincbeck merged commit 32d242f into apache:main Feb 18, 2026
86 checks passed
choo121600 pushed a commit to choo121600/airflow that referenced this pull request Feb 22, 2026
* feat(slack): add display_filename to SlackAPIFileOperator

* fix(slack): fix Sphinx spellcheck for display_filename docstring
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
* feat(slack): add display_filename to SlackAPIFileOperator

* fix(slack): fix Sphinx spellcheck for display_filename docstring
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
* feat(slack): add display_filename to SlackAPIFileOperator

* fix(slack): fix Sphinx spellcheck for display_filename docstring
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
* feat(slack): add display_filename to SlackAPIFileOperator

* fix(slack): fix Sphinx spellcheck for display_filename docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SlackAPIFileOperator: Allow content + filename together for display name when uploading content

2 participants