Closed kayaliabd closed 5 months ago
// Treating the type of file received and downloading it to the folder \temp
case AnsiIndexStr(UpperCase(AMessage.&type), ['PTT', 'IMAGE', 'VIDEO', 'AUDIO', 'DOCUMENT', 'STICKER', 'PTV']) of
0: Extensao_Documento := 'mp3';
1: Extensao_Documento := 'jpg';
2: Extensao_Documento := 'mp4';
3: Extensao_Documento := 'mp3';
4:
begin
Extensao_Documento := ExtractFileExt(AMessage.filename);
Extensao_Documento := Copy(Extensao_Documento,2,length(Extensao_Documento));
end;
5: Extensao_Documento := 'jpg'; //'webp';
6: Extensao_Documento := 'mp4'; //Instant Vídeo
end;
//Novo 05/11/2022
Automato_Path := ExtractFilePath(ParamStr(0));
NomeArq_Whats := WPPConnectDecrypt.download(AMessage.deprecatedMms3Url,
AMessage.mediaKey, Extensao_Documento, AChat.id, Automato_Path + 'Temp\');
I think you deploy this property to allow auto saving of all media files attached in messages
and save those files on the path of TWPPConnect.Config.ReceiveAttachmentPath
I try it but it didn't work as expected!