Skip to content

Commit

Permalink
feat(components): web - Download (#4068)
Browse files Browse the repository at this point in the history
* Components - web - Download

* Following the redirects by default
  • Loading branch information
Ark-kun committed Sep 2, 2020
1 parent 64d15f7 commit 240543e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions components/web/Download/component.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Download data
inputs:
- {name: Url, type: URI}
- {name: curl options, type: string, default: '--location', description: 'Additional options given to the curl bprogram. See https://curl.haxx.se/docs/manpage.html'}
outputs:
- {name: Data}
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
implementation:
container:
image: curlimages/curl
command:
- sh
- -exc
- |
url="$0"
output_path="$1"
curl_options="$2"
mkdir -p "$(dirname "$output_path")"
curl --get "$url" --output "$output_path" $curl_options
- inputValue: Url
- outputPath: Data
- inputValue: curl options

0 comments on commit 240543e

Please sign in to comment.