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
6 Replies
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?
Ok you could add a Set variable block that replace http:// with https://
{{URL}}.replace('http://', 'https://')
Thank you. I already did it.