curl -F "Filedata=@/Users/vvzvlad/Documents/REVIEWS/alpha\ mio/foto/003.jpg" "http://habrastorage.org/uploadController/?username=vvzvlad&userkey=7a25d94cde460365b6f7ce137675c623ec"
#!/usr/bin/env bash
upload_to_habrastorage () {
# --verbose для отладки
curl \
--cookie "habrastorage_sid=${1}" \
--form "files[]=@${2}" \
--header "X-Requested-With: XMLHttpRequest" \
--header "Referer: http://habrastorage.org/" \
--request POST \
http://habrastorage.org/main/upload
}
upload_to_habrastorage "you_sid" "filename"