@wildix/xbees-conversations-client > UploadFileCommand
UploadFileCommand class
Create a presigned URL for file upload in the channel.
Signature:
export declare class UploadFileCommand extends UploadFileCommand_base
Extends: UploadFileCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ConversationsClient, UploadFileCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, UploadFileCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // UploadFileInput
channelId: "STRING_VALUE", // required
name: "STRING_VALUE", // required
userId: "STRING_VALUE",
options: { // UploadFileOptions
category: "channels" || "recordings" || "wizyconfRecordings",
region: "STRING_VALUE",
},
};
const command = new UploadFileCommand(input);
const response = await client.send(command);
// { // UploadFileOutput
// fileId: "STRING_VALUE", // required
// presignedUploadUrl: "STRING_VALUE", // required
// };