Skip to content

[BR-2060]: fix/newobject single lookup#41

Open
jzunigax2 wants to merge 2 commits into
masterfrom
fix/newobject-single-lookup
Open

[BR-2060]: fix/newobject single lookup#41
jzunigax2 wants to merge 2 commits into
masterfrom
fix/newobject-single-lookup

Conversation

@jzunigax2
Copy link
Copy Markdown
Collaborator

NewObject previously paginated the entire parent directory via ListAllFiles (50 entries per request, sequential) to resolve a single file.

This change rewrites NewObject to do a single-file lookup using the existence-check + metadata endpoints already exposed by the SDK, Lookup cost drops from O(directory size) to a constant 2 API calls.

FTCHD and others added 2 commits May 13, 2026 22:29
- Replaced the preUploadCheck function with findFile for better clarity and efficiency in checking file existence.
- Introduced splitNameExt to encapsulate name and extension parsing logic.
- Updated NewObject and Update methods to utilize findFile for improved file metadata handling.
- Enhanced error handling and reduced redundant code in file checks.
@jzunigax2 jzunigax2 requested a review from larryrider May 14, 2026 04:21
@jzunigax2 jzunigax2 self-assigned this May 14, 2026
@jzunigax2 jzunigax2 added the bug Something isn't working label May 14, 2026
@jzunigax2 jzunigax2 marked this pull request as ready for review May 14, 2026 19:40
@jzunigax2 jzunigax2 changed the title fix/newobject single lookup [BR-2060]: fix/newobject single lookup May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants