Skip to content

feat!: remove deprecated onUpload callback from CldUploadWidget - #667

Merged
PaulBoye-py merged 1 commit into
betafrom
feat/remove-onupload
Oct 3, 2026
Merged

PaulBoye-py merged 1 commit into
betafrom
feat/remove-onupload

Conversation

@PaulBoye-py

Copy link
Copy Markdown
Collaborator

Description

Removes the deprecated onUpload prop from CldUploadWidget and CldUploadButton for v7. It has been deprecated in favor of onSuccess since #424, and it only duplicated the success event, printing a deprecation warning in development.

The docs examples that still used onUpload now use onSuccess, and the "onUpload (Deprecated)" row is removed from the configuration table. The uploading guide's examples also used an older (error, result, widget) signature that no longer matched the component, so they are corrected too.

Migration: the second argument of onSuccess is an options object, not the widget itself:

// Before
onUpload={(result, widget) => { widget.close(); }}

// After
onSuccess={(result, { widget }) => { widget.close(); }}

Issue Ticket Number

No separate issue. Part of the v7.0.0 scope discussed in #523 (scope comment).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Fix or improve the documentation
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

Testing

  • Unit tests pass (16/16), the library typechecks and builds, and the Next.js 16 test app builds.
  • Type check: onUpload is now rejected on both components, and the documented onSuccess pattern compiles.
  • Manual test with real unsigned uploads: onSuccess fired once per upload on both CldUploadWidget and CldUploadButton, and widget.close() from the options argument closed the widget.

onUpload has been deprecated in favor of onSuccess since #424 and only
duplicated the success event. Remove the prop from CldUploadWidget and
CldUploadButton, and update docs examples to use onSuccess.

BREAKING CHANGE: The `onUpload` prop has been removed from
CldUploadWidget and CldUploadButton. Use `onSuccess` instead. Note that
the second argument is now an options object:
`onUpload={(result, widget) => ...}` becomes
`onSuccess={(result, { widget }) => ...}`.
@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
next-cloudinary Ready Ready Preview Sep 29, 2026 11:24pm UTC

Request Review

@PaulBoye-py PaulBoye-py mentioned this pull request Oct 1, 2026
@PaulBoye-py
PaulBoye-py merged commit 29c2655 into beta Oct 3, 2026
7 checks passed
@PaulBoye-py
PaulBoye-py deleted the feat/remove-onupload branch October 3, 2026 08:16

This branch was successfully deployed

1 active deployment
Preview — 0d08df9c Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant