Hi, this si my first post so i say hello to everyone.
I'm trying to upload a file using HTTP action.
the spcification are:
2 parameters:
id = Item unique id (i.e. 7813)
images = array of objects with 2 nodes: "name" = name of the file and "content" = base64 file content
I'm trying the following flow:
I receive the following error:
Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: <. Path '', line 0, position 0.'
Where is the error?
Thank you very much for your help.
Regards
Andrea
Get file content action are already base64
You can simply use,
body('Get_file_content').$content
Hi,
just a quick update.
I was able to get the http action working only with the form-urlencoded Content-Type and passing the various parameters by replacing the special characters using the encodeURIcomponent command.
No success using multipart conte-type. Obviously the formatting to be put as Body must be particular and I don't know how I have to manage it.
I can confirm that urlencoded just work.
Hi,
unfortunately this doesn't solve the issue. Still receiving the same error message.
I've tried to use Postman to send the same request and it works.
Hi there. Did you already try wrapping the Output dynamic value in quotes? Kind of like this:
If not, give that a go and let us know how it works out.
Good luck!
-Ed
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1