Skip to content

Conversation

@mdotme
Copy link
Contributor

@mdotme mdotme commented Jan 26, 2026

πŸ”— Linked issue

Resolves #5918

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@mdotme mdotme requested a review from benjamincanac as a code owner January 26, 2026 05:58
@github-actions github-actions bot added the v4 #4488 label Jan 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

πŸ“ Walkthrough

Walkthrough

A new optional previewFile prop is added to the FileUpload component to control whether file previews are generated and displayed. The createObjectUrl function's return type is updated from string to string | undefined to reflect that it may not generate a blob URL. When previewFile is false, the function returns undefined; otherwise, it creates and returns a blob URL as before. Minor default value adjustments accompany the new prop.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description check βœ… Passed The description is related to the changeset, indicating the PR resolves issue #5918 and documents the type of change (enhancement and new feature).
Linked Issues check βœ… Passed The PR fully addresses issue #5918 by implementing a previewFile prop to disable image previews, allowing consistent placeholder behavior across file types.
Out of Scope Changes check βœ… Passed All changes are directly related to implementing the previewFile prop feature requested in issue #5918; no out-of-scope modifications detected.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check βœ… Passed The title accurately and concisely summarizes the main change: adding a new previewFile prop to the FileUpload component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

npm i https://pkg.pr.new/@nuxt/ui@5935

commit: de7c015

@benjamincanac benjamincanac changed the title feat: add previewFile prop to UFileUpload feat(FileUpload): add previewFile prop Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disable FileUpload image preview

1 participant