Skip to main content
Table of Contents

TTMSFNCCloudWhatsApp.UploadAudio Method

Uploads an audio file.

API unit family: TMSFNCCloudWhatsApp Declaring type: TTMSFNCCloudWhatsApp Inherited from: TTMSFNCCloudCustomWhatsApp

Overloads

Overload 1

Uploads an audio file.

FMX.TMSFNCCloudWhatsApp.hppPascalC++
function UploadAudio(AMedia: TTMSFNCUtilsFile; AAsync: Boolean = true): Integer; overload;
int __fastcall UploadAudio(TTMSFNCUtilsFile AMedia, bool AAsync = true)/* overload */;

Parameters

Name Description
AMedia File object that provides the audio content.
AAsync Set to True to perform the upload asynchronously when supported.

Returns

The index of the media entry in Files, or -1 when the upload is asynchronous or fails before a media entry is created.

Overload 2

Uploads audio content from a stream.

FMX.TMSFNCCloudWhatsApp.hppPascalC++
function UploadAudio(AMediaStream: TStream; AFileName: string; AAsync: Boolean = true): Integer; overload;
int __fastcall UploadAudio(System::Classes::TStream* AMediaStream, System::UnicodeString AFileName, bool AAsync = true)/* overload */;

Parameters

Name Description
AMediaStream Stream that contains the audio content.
AFileName File name to associate with the uploaded audio.
AAsync Set to True to perform the upload asynchronously when supported.

Returns

The index of the media entry in Files, or -1 when the upload is asynchronous or fails before a media entry is created.