Upload from URL

Upload from URL#

In that case, we'll download the URL given in the parameters, and upload it in your airstore container.

It might be useful for many usecases but we cannot guarantee the success of this method -- for example, if the remote server takes too long to reply (timeout), or if it returns an error code.

Example with cURL#

Upload that file (simple example)

curl -X POST \
  "https://subdomain.api.airstore.io/v1/upload?dir=/" \
  -H 'Content-Type: application/json' \
  -H 'X-Airstore-Secret-Key: 00000000111122223333444444444444' \
  --data '{"files_urls": ["http://sample.li/birds.jpg"]}'

It will download this URL http://sample.li/birds.jpg and upload it on your airstore bucket.