docs(js-sdk): add uploadFiles() documentation#427
Open
PrajwalDhuleCC wants to merge 3 commits into
Open
Conversation
…and media upload error codes - Add new "Upload Files & Send Attachments" guide documenting CometChat.uploadFiles() flow with per-file progress, cancel, and retry - Add "Upload Files" page to JavaScript SDK Messaging section in docs.json - Document Media Upload error category and specific error codes (ERR_INVALID_FILE_OBJECT, ERR_FILE_SIZE_EXCEEDED, ERR_FILE_COUNT_EXCEEDED, ERR_S3_UPLOAD_FAILED, ERR_PRESIGNED_URL_EXPIRED, ERR_UPLOAD_STALLED, ERR_UPLOAD_CANCELLED) in error-codes.mdx - Update send-message.mdx to recommend upload-first pattern for multi-attachment composers and link to new upload guide - Add CometChat.getMaxAttachmentCount() runtime API reference for checking attachment limits - Clarify distinction between rejected (non-retryable) and failed (retryable) upload errors with MediaUploadListener callback mapping
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
📋 Docs review — ✅ ApproveReviewed this PR for docs-breakage and content accuracy, cross-checked against the implementing SDK PR Verdict: Approve. Structurally safe and content-accurate — near-perfect. ✅ What passed
🔹 Minor / optional (non-blocking)
🤖 Automated docs review (Claude Code), cross-checked against the implementing code PR. |
…error code documentation
Rewrite the file-upload docs for the new request-object architecture that replaces the flat CometChat.uploadFiles(...) surface. - upload-files.mdx: rebuild around CometChat.createUploadFileRequest(receiverId, receiverType) -> UploadFileRequest; document uploadAttachment(s) with the required caller-supplied fileId, the renamed UploadFileListener / onFileProgress, request configuration (setConcurrency / setBatchId / setParentMessageId), incremental adds, per-call vs global listeners, batch getters (getAttachment(s) / getAttachmentsByType / getAttachmentCount / getStatus), and removeAttachment / retryAttachment / clearAll. UploadStatus is IN_PROGRESS / IDLE; getMaxAttachmentCount stays top-level. - send-message.mdx: update the upload-then-send cross-references to createUploadFileRequest() / request.getAttachments(). - error-codes.mdx: rename MediaUploadListener -> UploadFileListener and retryFileUpload -> retryAttachment in the Media Upload Errors intro.
suraj-chauhan-cometchat
added a commit
that referenced
this pull request
Jul 22, 2026
Rewrite the React Native "Upload Files" guide to the request-object upload API the RN SDK actually ships (CometChat.createUploadFileRequest -> UploadFileRequest), mirroring the JS SDK guide (PR #427) section-for-section. The previous draft documented a functional CometChat.uploadFiles() surface that does not exist in @cometchat/chat-sdk-react-native. - upload-files.mdx: createUploadFileRequest + UploadFileRequest, caller- supplied fileId, UploadFileListener.onFileProgress, UploadResult.batchId, getAttachments/getAttachmentsByType/getStatus (IN_PROGRESS/IDLE), addUploadListener, removeAttachment, clearAll, getMaxAttachmentCount(). Retry documented as re-upload of the same fileId (RN has no retryAttachment()); RN-specific error codes added (ERR_UNAUTHENTICATED, ERR_PRESIGN_REJECTED, ERR_PRESIGN_FETCH_FAILED). - send-message.mdx: fix phantom-API references — getFileUploadLimits() -> getMaxAttachmentCount(), uploadFiles() -> UploadFileRequest. - docs.json: add the upload-files page to RN Messaging nav. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue(s)
Type of Change
Checklist
Additional Information
Screenshots (if applicable)