I do some parsing for file name based on the Content-Disposition
header field using the following expression:
split(outputs('HTTP')['headers']?['Content-Disposition'],'"')[1]
This function splits on "
and returns the 2nd element
Usually the Content-Disposition
field is returned like:
attachment; filename="Filename.pdf"
However I encountered a problem when the filename had a foreign character in it and it came in the format of:
attachment; filename*=UTF-8''Filename with %C3%B1.pdf
which is the utf-8 reprentation for Filename with ñ.pdf
How do I account for this in my logic to return only the filename?