Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TWPPConnect.Config.ReceiveAttachmentAuto #66

Closed
kayaliabd opened this issue Dec 18, 2023 · 1 comment
Closed

TWPPConnect.Config.ReceiveAttachmentAuto #66

kayaliabd opened this issue Dec 18, 2023 · 1 comment

Comments

@kayaliabd
Copy link

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!

marcelo386 pushed a commit that referenced this issue Jan 31, 2024
@marcelo386
Copy link
Collaborator

          // 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\');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants