You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

tim-upload-plugin

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tim-upload-plugin

Official Upload Plugin for Tencent Cloud Chat

1.4.2
latest
68

Supply Chain Security

100

Vulnerability

75

Quality

88

Maintenance

100

License

Network access

Supply chain risk

This module accesses the network.

Found 1 instance in 1 package

Version published
Weekly downloads
1.5K
15.53%
Maintainers
3
Weekly downloads
 
Created

Introduction

Tencent Cloud Chat provides globally interconnected chat APIs, multi-platform SDKs, and UIKit components to help you quickly bring messaging capabilities such as one-to-one chat, group chat, chat rooms, and system notifications to your applications and websites.

Tencent Cloud Chat upload plugin is used to upload messages of types such as images, voice, video, and files. It supports platforms including Web, ReactNative, WeChat, QQ, Baidu, Toutiao, and Alipay Mini Programs.

Advantages

Using tim-upload-plugin has the following 2 advantages:

  • More secure application data
  • Very small size, only 9KB, which is more friendly to Mini Program applications

How to Use

Use npm to install the corresponding Chat SDK dependencies in your project.

npm install @tencentcloud/chat --save
npm install tim-upload-plugin --save
import TencentCloudChat from '@tencentcloud/chat';
import TIMUploadPlugin from 'tim-upload-plugin';

let options = {
  SDKAppID: 0 // Replace 0 with the SDKAppID of your Chat application when connecting.
};
// Create an SDK instance.
// The `TencentCloudChat.create()` method returns the same instance for the same `SDKAppID`.
// The SDK instance is usually represented by chat.
let chat = TencentCloudChat.create(options);

// Set the SDK log level.
// 0: Common level. You are advised to use this level during access as it covers more logs.
// 1: Release level. You are advised to use this level for key information in a production environment.
chat.setLogLevel(0);
// chat.setLogLevel(1);

// Register the Tencent Cloud Chat upload plugin.
chat.registerPlugin({'tim-upload-plugin': TIMUploadPlugin});

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts