Hello,
I am trying to POST an email (Outlook) PDF attachment file to my Azure Function by HTTP POST.
The function knows to take POST body, which should contain PDF byte array, and process it. (Tested with Postman, works.)
But if I send it from the Flow as HTTP POST request with the body of "Attachments Content", it arrives at the function in the wrong format. Function logic doesn't recognize it as PDF.
How should I send the attachment file content so it will arrive as correct byte array?
Any luck on this? I am facing similar issue. Works fine with Postman.
I tried the solution but it doesn't convert it to ByteArray
used this in expression
as we can see i also tried using
base64(items('Apply_to_each_2')?['contentBytes']) but that also doesn't work
The expected output is to be in form of like below
Does anyone know how to solve the issue?
@v-litu-msft Tried. The same problem.
My Azure function code:
As I said above this code works well when I post a file from Postman.
Hi @AlexRUiLs,
How about using the base64() function to convert the attachment content into the base64 code? Then append it into the HTTP request body?
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional