Skip to content

feat(FileUpload): add previewFile prop#5935

Open
mdotme wants to merge 4 commits intonuxt:v4from
mdotme:feat/file-upload/preview-file
Open

feat(FileUpload): add previewFile prop#5935
mdotme wants to merge 4 commits intonuxt:v4from
mdotme:feat/file-upload/preview-file

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
Contributor

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: 06d957c

@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