Commit 5a317fd
docs(sdk/react-native): align upload-files with UploadFileRequest API
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>1 parent f08f449 commit 5a317fd
3 files changed
Lines changed: 365 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3521 | 3521 | | |
3522 | 3522 | | |
3523 | 3523 | | |
| 3524 | + | |
3524 | 3525 | | |
3525 | 3526 | | |
3526 | 3527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
441 | 441 | | |
442 | | - | |
443 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
| |||
0 commit comments