Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve forgetFiles to handle nested structures and edge cases #115

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rottifant
Copy link

Changes:

  • Recursive File Detection:

  • Improved Compatibility with Non-Iterable Objects:

    • Utilizes Object.getOwnPropertyNames to ensure compatibility with non-iterable objects, allowing files in such objects to be detected reliably.
  • Backward Compatibility:

    • The function remains compatible with existing features and use cases.
    • The updated logic does not change the behavior for flat or simple structures but corrects previous incorrect behavior.

  • Ensures that file uploads in complex payloads are accurately detected, even when files are deeply nested within other data.
  • No breaking changes, making it easy for users to adopt the updated functionality.

- Added recursive support to remove files from deeply nested arrays and objects.
- Improved compatibility with non-iterable objects using Object.getOwnPropertyNames.
@rottifant rottifant marked this pull request as draft December 30, 2024 23:40
@rottifant rottifant marked this pull request as ready for review December 31, 2024 00:10
@taylorotwell taylorotwell marked this pull request as draft December 31, 2024 17:52
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.

Files in nested objects are sent during validation
1 participant