Answer the question
In order to leave comments, you need to log in
Habrastorage: how to load from the console?
Some time ago I wrote a script for loading pictures on habrastorage: habrahabr.ru/post/207282
But TM updated the storage, and now the download does not work. Previously the following command was used:
curl -F "[email protected]/Users/vvzvlad/Documents/REVIEWS/alpha\ mio/foto/003.jpg" "http://habrastorage.org/uploadController/?username=vvzvlad&userkey=7a25d94cde460365b6f7ce137675c623ec"
Answer the question
In order to leave comments, you need to log in
#!/usr/bin/env bash
upload_to_habrastorage () {
# --verbose для отладки
curl \
--cookie "habrastorage_sid=${1}" \
--form "files[][email protected]${2}" \
--header "X-Requested-With: XMLHttpRequest" \
--header "Referer: http://habrastorage.org/" \
--request POST \
http://habrastorage.org/main/upload
}
upload_to_habrastorage "you_sid" "filename"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question