Skip to content

feat(module:upload): support promise return type nzBeforeUpload - #9402

Merged
Laffery merged 10 commits into
NG-ZORRO:masterfrom
Nicoss54:doc/upload-file-png-only
Sep 16, 2025
Merged

Laffery merged 10 commits into
NG-ZORRO:masterfrom
Nicoss54:doc/upload-file-png-only

Conversation

@Nicoss54

@Nicoss54 Nicoss54 commented Sep 11, 2025 •

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

  • Deprecated nzTransformFile
  • Add showcase for showing beforeUpload hook with image png only use case

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@codecov

codecov Bot commented Sep 11, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.20%. Comparing base (7b5a563) to head (f8e393c).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9402      +/-   ##
==========================================
- Coverage   92.09%   91.20%   -0.89%     
==========================================
  Files         561      561              
  Lines       19758    19732      -26     
  Branches     3033     3031       -2     
==========================================
- Hits        18196    17997     -199     
- Misses       1231     1407     +176     
+ Partials      331      328       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .cursor/mcp.json Resolved

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread components/upload/demo/png-only.md Resolved
@Nicoss54
Nicoss54 force-pushed the doc/upload-file-png-only branch 2 times, most recently from f4c4972 to 222a969 Compare September 12, 2025 14:31
@Nicoss54 Nicoss54 changed the title docs: add showcase upload png only feat(module:upload): support promise return type nzBeforeUpload Sep 12, 2025
Comment thread components/upload/demo/png-only.md Resolved
Comment thread components/upload/interface.ts Resolved
Comment thread components/upload/demo/png-only.md Resolved

@Nicoss54 Nicoss54 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@HyperLife1119 all change requested is implemented :)

Comment thread components/upload/upload.component.ts Resolved
@Nicoss54
Nicoss54 force-pushed the doc/upload-file-png-only branch from c47c78b to 72664a1 Compare September 13, 2025 15:39
@Nicoss54
Nicoss54 force-pushed the doc/upload-file-png-only branch from 72664a1 to b792349 Compare September 13, 2025 15:39

@Nicoss54 Nicoss54 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh, it's there again :)

revert :)

Sometimes I can be really absent-minded.

Sorry about that.

@HyperLife1119

Copy link
Copy Markdown
Collaborator
image

I think the demo also needs to be updated from nzTransformFile to beforeUpload :)

@Nicoss54

Copy link
Copy Markdown
Collaborator Author

I will do it ? Excellent idea

@Nicoss54

Copy link
Copy Markdown
Collaborator Author

@HyperLife1119 after thinking as nzTransformFile is still deprecated maybe we need to keep the demo WDYT? And when we removed it update the demo ?

@HyperLife1119

Copy link
Copy Markdown
Collaborator

I think the demo just needs to be updated and mentioned in the demo documentation that nzTransformFile is deprecated.

@Nicoss54 Nicoss54 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@HyperLife1119 finally adapting the demo needs some changes on how we post the file. I put some comment to explain why i made this change :)

@HyperLife1119 HyperLife1119 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread components/upload/demo/png-only.md Resolved
Comment thread components/upload/demo/png-only.md Resolved

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Laffery
Laffery merged commit cece107 into NG-ZORRO:master Sep 16, 2025
@Nicoss54
Nicoss54 deleted the doc/upload-file-png-only branch September 17, 2025 11:51
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.

3 participants