Share feedback, ideas and get community help

Updated 2 months ago

PDF Url with space

I have a webhook that send me a pdf url with space.
For sample: "DOCUMENTLINK": "Http://saddss/temp/Declaracao de Filiacao - XXXX YYYY 06_12_23.PDF".
I am putting an embed with the url as:
{{=encodeURI({{documento}})=}}
But it doesn´t work.
I also tried create a new var as below without success:
const documentoEncode = encodeURI({{documento}}) return documentoEncode
B
L
6 comments
Works on my end
Hi, thank you @Baptiste. I find my problem. The pdf link returned from webhook is something as: 'http://xxxx pdf' , but the server redirect to 'https:// xxxx pdf'
If I copy and past 'http://xxxx pdf' and put it into chrome browser, it redirects to 'htpps ://xxxx pdf' and all works well. But, if I put t http://xxxx pdf into a embed block, It doesn´t show the pdf because It´s not redirected to 'https....'. Is there something I can do to fix it?
Just to be sure, can the pdf file be embedded? Have you tried to put the https URL directly into the embed bubble and it works?
If I put the https://xxx directly it works, but not htpp://xxx
Ok you could add a Set variable block that replace http:// with https://

{{URL}}.replace('http://', 'https://')
Thank you. I already did it.
Add a reply
Sign up and join the conversation on Discord