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

[0.5.x] 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
@timacdonald timacdonald changed the title Improve forgetFiles to handle nested structures and edge cases [0.5.x] Improve forgetFiles to handle nested structures and edge cases Jan 12, 2025
@timacdonald timacdonald self-assigned this Jan 12, 2025
@rottifant
Copy link
Author

@timacdonald What's the current status? If I can help anything, please let me know.

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
2 participants