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

/sendFile end point ignores 'filename' request parameter #133

Closed
ehussain opened this issue Jul 10, 2023 · 6 comments
Closed

/sendFile end point ignores 'filename' request parameter #133

ehussain opened this issue Jul 10, 2023 · 6 comments
Labels
bug Something isn't working patron:ADVANCED waha:PLUS Relates to WAHA Plus version

Comments

@ehussain
Copy link

Hello,

I sent a request to /api/sendFile end point which contains following json.

(
    [json] => Array
        (
            [chatId] => xxxx@c.us
            [session] => 0c79e8f0-1bf0-11ee-aac6-4bba6cfec57f
            [type] => media
            [file] => Array
                (
                    [mimetype] => application/pdf
                    [filename] => 1688567559635.pdf
                    [url] => https://7c89-116-72-22-45.ngrok-free.app/file/r/387fc6a0-1ef5-11ee-a9e1-e12a60ff0642
                )

            [caption] => 
        )
)

note : this is php array structure but json request was successful. I got response and file on whatsapp as well.

However the whatsapp shows file with this information.

image

As you can see the caption and filename is not received correctly.

Expected output.
File should be received with name as '1688567559635.pdf' and without any caption.

@allburov
Copy link
Contributor

Hi! Could you attach JSON request that can be tested in swagger directly please?
Just to make sure there's no language related serialization issue too

@allburov allburov added bug Something isn't working waha:PLUS Relates to WAHA Plus version labels Jul 10, 2023
@ehussain
Copy link
Author

Hello,

Attached the exact json request I am sending. I have masked the phone number.

{"chatId":"XXXXXXXXXXXX@c.us","session":"0c79e8f0-1bf0-11ee-aac6-4bba6cfec57f","type":"media","file":{"mimetype":"application\/pdf","filename":"1688567559635.pdf","url":"https:\/\/7c89-116-72-22-45.ngrok-free.app\/file\/r\/20391ec0-1f02-11ee-b611-23762cf3fa89"},"caption":null}

@allburov
Copy link
Contributor

I've fixed the issue with filename field - it should work now in the latest version (just published it)

About caption - he have a ticket for that already, sorry, didn't find it first time #94
It works only in NOWEB engine. Just checked - it's not ready in default (WEBJS) one yet

Let me know if filename works for you and we can close the issue (we'll work on caption in the #94)

@ehussain
Copy link
Author

Hello. We are using 'WEBJS' engine right now. Is it available in that engine?

We have to use WEBJS to ensure that phone number doesn't get blocked.

@allburov
Copy link
Contributor

Filename - yes, caption - not :(

@allburov allburov added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Jan 7, 2024
@devlikepro
Copy link
Contributor

devlikepro commented Mar 22, 2024

Hi!
caption has been fixed in WAHA Plus 2024.3.9
Now both caption and filename should work with no issues in both WEBJS and NOWEB engine.

patron:PRO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patron:ADVANCED waha:PLUS Relates to WAHA Plus version
Projects
None yet
Development

No branches or pull requests

3 participants