Upload big files

HTTP PUT Method#

If you want to upload big files (such as containers, backup TGZ or other things), you might want to use the HTTP PUT method, which suits more the upload of big files.

cURL one liner#

curl -X PUT -T "/home/backups/some-container.tgz" \
     -H 'X-Airstore-Secret-Key: 00000000111122223333444444444444' \

Be sure to use the -T parameter with the PUT. From the cURL documentation :

curl/man page
-T, --upload-file <file>
    This transfers the specified local file to the remote URL. 

See more here: https://curl.haxx.se/docs/manpage.html

If you want to track the process, you can use this:

curl -X PUT --progress-bar -T "/home/backups/some-container.tgz" \
     -H 'X-Airstore-Secret-Key: 00000000111122223333444444444444' \
     "https://subdomain.api.airstore.io/v1/upload?filename=some-container.tgz&dir=/backups/2019-01/" \
     | tee /dev/null

You'll see a progression bar like this while uploading:

########_____________________________      25.4%