Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@
"sdk/javascript/advanced-overview",
"sdk/javascript/connection-status",
"sdk/javascript/managing-web-sockets-connections-manually",
"sdk/javascript/secure-media-access"
"sdk/javascript/token-based-file-access"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion sdk/javascript/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ The `AppSettings` class allows you to configure the following settings:
* **overrideAdminHost(adminHost: string)**: This method takes the admin URL as input and uses this admin URL instead of the default admin URL. This can be used in case of dedicated deployment of CometChat.
* **overrideClientHost(clientHost: string)**: This method takes the client URL as input and uses this client URL instead of the default client URL. This can be used in case of dedicated deployment of CometChat.
* **setStorageMode(storageMode)**: This method allows you to configure how CometChat stores data locally. The storageMode parameter can be set to `CometChat.StorageMode.SESSION` to use session storage, which persists data only for the current browser session, or other available storage modes for different persistence behaviors.
* **setSecureMediaMode(mode)**: This method sets the secure media access mode for handling media file URLs. See the [Secure Media Access](/sdk/javascript/secure-media-access) guide for details on available modes and configuration.
* **setSecureMediaMode(mode)**: This method sets the token based file access mode for handling media file URLs. See the [Token Based File Access](/sdk/javascript/token-based-file-access) guide for details on available modes and configuration.

You need to call `init()` before calling any other method from CometChat. We suggest you call the `init()` method on app startup, preferably in the `index.js` file.

Expand Down
2 changes: 1 addition & 1 deletion sdk/javascript/send-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ To send a media message to any user or group, you need to use the `sendMediaMess

<Note>

If [Secure Media Access](/sdk/javascript/secure-media-access) is enabled for your app, media URLs returned by the SDK may require token-based access. Depending on the configured mode, the SDK either appends a File Access Token (FAT) automatically or requires you to fetch a presigned URL before rendering media. See the [Secure Media Access](/sdk/javascript/secure-media-access) guide for details.
If [Token Based File Access](/sdk/javascript/token-based-file-access) is enabled for your app, media URLs returned by the SDK may require token-based access. Depending on the configured mode, the SDK either appends a File Access Token (FAT) automatically or requires you to fetch a presigned URL before rendering media. See the [Token Based File Access](/sdk/javascript/token-based-file-access) guide for details.

</Note>

Expand Down
2 changes: 1 addition & 1 deletion sdk/javascript/setup-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The `AppSettings` class allows you to configure two settings:
* **overrideAdminHost(adminHost: string)**: This method takes the admin URL as input and uses this admin URL instead of the default admin URL. This can be used in case of dedicated deployment of CometChat.
* **overrideClientHost(clientHost: string)**: This method takes the client URL as input and uses this client URL instead of the default client URL. This can be used in case of dedicated deployment of CometChat.
* **setStorageMode(storageMode)**: This method allows you to configure how CometChat stores data locally. The storageMode parameter can be set to `CometChat.StorageMode.SESSION` to use session storage, which persists data only for the current browser session, or other available storage modes for different persistence behaviors.
* **setSecureMediaMode(mode)**: This method sets the secure media access mode for handling media file URLs. See the [Secure Media Access](/sdk/javascript/secure-media-access) guide for details on available modes and configuration.
* **setSecureMediaMode(mode)**: This method sets the token based file access mode for handling media file URLs. See the [Token Based File Access](/sdk/javascript/token-based-file-access) guide for details on available modes and configuration.

You need to call `init()` before calling any other method from CometChat. We suggest you call the `init()` method on app startup, preferably in the `index.js` file.

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui-kit/react/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Beyond text, CometChat allows users to share various media types within their co
| [Message List](/ui-kit/react/message-list) | The [Message List](/ui-kit/react/message-list) component is responsible for rendering various Media Message bubbles, such as Image, File, Audio & Video Bubble. |

<Note>
For secure media access using presigned URLs, you can enable Header-Based mode during initialization. See [Setting Secure Media Mode](/ui-kit/react/methods#setting-secure-media-mode) for configuration details.
For token based file access using presigned URLs, you can enable Header-Based mode during initialization. See [Setting Token Based File Access Mode](/ui-kit/react/methods#setting-token-based-file-access-mode) for configuration details.
</Note>

## Read Receipts
Expand Down
10 changes: 5 additions & 5 deletions ui-kit/react/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ CometChatUIKit.init(UIKitSettings)?.then(() => {
</Tab>
</Tabs>

### Setting Secure Media Mode
### Setting Token Based File Access Mode

CometChat supports two modes for accessing media files. In **EMBEDDED** mode (the default), media URLs include a query-parameter token automatically and no extra steps are needed. In **HEADER_BASED** mode, media URLs are resolved via presigned URLs using `CometChat.fetchPresignedUrl(url)`, providing enhanced security for media access.

Expand All @@ -141,9 +141,9 @@ const UIKitSettings = new UIKitSettingsBuilder()
.setSecureMediaMode(CometChat.SecureMediaMode.HEADER_BASED)
.build();

//Initialize CometChat UI Kit with Secure Media Mode
//Initialize CometChat UI Kit with Token Based File Access Mode
CometChatUIKit.init(UIKitSettings)?.then(() => {
console.log("Initialization completed successfully with secure media mode");
console.log("Initialization completed successfully with token based file access mode");
// You can now call login function.
})
.catch(console.log);
Expand All @@ -169,9 +169,9 @@ const UIKitSettings = new UIKitSettingsBuilder()
.setSecureMediaMode(CometChat.SecureMediaMode.HEADER_BASED)
.build();

//Initialize CometChat UI Kit with Secure Media Mode
//Initialize CometChat UI Kit with Token Based File Access Mode
CometChatUIKit.init(UIKitSettings)?.then(() => {
console.log("Initialization completed successfully with secure media mode");
console.log("Initialization completed successfully with token based file access mode");
// You can now call login function.
})
.catch(console.log);
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/react/react-js-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ These values are required for proper authentication and seamless integration.

<Note>

You can configure secure media access during initialization using `UIKitSettingsBuilder`. To enable presigned URL-based media access, see [Setting Secure Media Mode](/ui-kit/react/methods#setting-secure-media-mode).
You can configure token based file access during initialization using `UIKitSettingsBuilder`. To enable presigned URL-based media access, see [Setting Token Based File Access Mode](/ui-kit/react/methods#setting-token-based-file-access-mode).

</Note>

Expand Down