Get File from API Action - NodeJS [OpenSource] (v0.2)

Hi there fellow Wapplers,

I have created my first extension :tada:
Well…not really. I have only copied @mebeingken’s extension:
Custom File Actions [Node]

And adjusted it to suit my needs. Also learned a lot from this extension by @sid:
API File Upload Action - NodeJS & PHP [Open Source]

I did see quite a lot of topics requesting something like this, so I thought it would be good to share it.

You find the action next to Sid’s:
action

And currently these are the settings available:

It now downloads a file from an api and saves it under the original filename to your desired save path.

Like I said, it is based on Ken’s extension, which was based on node request. Which is deprecated, I am not sure if this is an issue or not. If it is an issue please suggest alternatives.

Right now I only made an option to change the url and add headers to the request. Because that is what I needed. If you need params or body or something, please comment below.

Also, right now it does not catch errors or response codes. I haven’t figured out how to properly do that, yet.

FileDownloadModule.zip (1.8 KB)

bg

Jelle

Community Page
Last updated: