Upload Media File thru thirdparty API

I am able to upload my chosen file using postman. How do I replicate this same code below(which has been derived from postman) in appgyver?

var myHeaders = new Headers();

myHeaders.append(“UName”, “admin123”);

var formdata = new FormData();

formdata.append(“file”, fileInput.files[0], “/C:/Users/coolbeans/Downloads/6ip6pxo4T.gif”);

var requestOptions = {

method: ‘POST’,

headers: myHeaders,

body: formdata,

redirect: ‘follow’


fetch(“https://???.com/upload.ashx?name=51030241.jpg&title=RRR&Description=descrpt&Tags=tag1,tag2,tag3&private=1&Ratings=0&Type=2&UName=admin123&Cats=sad”, requestOptions)

.then(response => response.text())

.then(result => console.log(result))

.catch(error => console.log(‘error’, error));

You can use HTTP Request flow function

Yes I’ve tried that but I’m not sure how to set up the “Request Body” for the HTTP Request flow, in order to send the actual picked file. Is there anyway to show me a logic flow to achieve this?

Can anyone else help me please?

There was an issue with upload files that was recently solved, that may help solving this issue, hopefully you’ve been able to get forward with this now.

Hello everyone, I still need some assistance as mentioned above. I am stuck on this line.

var formdata = new FormData();
formdata.append(“file”, fileInput.files[0], “/C:/Users/coolbeans/Downloads/6ip6pxo4T.gif”);

If anyone can help me figure this out, I would be very thankful.

Hi @Mevi , just following up on this issue.

Hrm, there’s a lot of info missing here that’s in the DMs now, so will not be useful for others without more explanation :confused: But I’ll continue here anyway –

I added the other header into your Upload files. Please test it out.

Hello @Mevi, still notworking for some reason. To be clear I running your buttons named B1,B2 A and B3 A. I switched the url to a new hookbin end point, and its erroring out. I am hoping to resolve this as its already 1 month and 2 days since I raised on this thread and nearly 1.5 months since I raised it on the public forum. :cry: :cry:

I’m sorry, I feel like I will be unable to solve this for you :frowning:

EDIT: I came across this thread and realized that it isn’t currently possible to pass Content-Type in Upload Files. Currently looking into HTTP Request, that Content-Type is passed from bodyType property as far as I understand.

Thanks Mevi, Hopefully we can get this resolved. this is the final issue i need resolved to complete my app.

As answered here, we will be doing a new flow function for this type of multipart-data/form upload.

Hi @Mevi, do you know if any progress has been made on this?

Unfortunately not, as we have had to prioritize other things– it’s still on our backlogs, but we haven’t been able to get to it as of yet.