smilax:: WebLog #1 Topic : 2003-11-04 01.47.30 strick : Uploading with CURL | [Changes] [Calendar] [Search] [Index] [PhotoTags] |
[Bedstraw] *smilax* |
|
[Back to weblog: Smilax.org] |
Substitute the filename (/tmp/mypicture.jpg), username, passwd, hostname wiki.yak.net, and the page number (69) with your data. Notice that the filestuff=@ must be used.
curl -F filestuff=@/tmp/mypicture.jpg https://username:passwd@wiki.yak.net/69.upload |
for x in *.jpg do curl -F filestuff=@$x https://username:passwd@wiki.yak.net/69.upload done |
Download CURL for many platforms here -> http://curl.haxx.se/download.html
Discussion:showing all 11 messages [Show 3 7 *10* 14 30 100 999 days or 10 *20* 30 50 100 999 messages] |
|
[edit]
|
oh 'curl' seems to be pretty standard on RedHat distro,
also it's not hard to make yourself.
|
|
[edit]
|
artkast sez it's on his mac OSX
( http://www.artkast.com/ )
|
|
[edit]
|
[virgil@dhcp-144-68 Mini-Kryptos-Medusa]$ ./put.sh 32 curl: (51) SSL: unable to obtain common name from peer certificate [virgil@dhcp-144-68 Mini-Kryptos-Medusa]$ cat put.sh #!/bin/sh for x in *.jpg do curl -F filestuff=@$x https://****:****@kryptos.yak.net/$1.upload done [virgil@dhcp-144-68 Mini-Kryptos-Medusa]$ -------------------------------------- ): -- note the user and password are correct. |
|
[edit]
|
"unable to obtain common name from peer certificate"
i tried making new SSL certificate -- looks like it failed. i'll try again, thx |
|
[edit]
|
fixed. a cert without a "common name" is weird.
now the CN is "smilax.org"
curl likes it for me. hopefull for you too.
|
|
[edit]
|
how to make certs for SSL smilax:
1 mkdir /tmp/sslkey 2 cd /tmp/sslkey 3 openssl req -new -text -nodes -out req -keyout key 4 cat req 5 openssl req -x509 -text -days 8888 -in req -key key -out cert 6 less cert 7 cat key cert > /data/key.pem 8 cat cert > /data/root.pem 9 chmod 400 /data/key.pem 10 chown smilax.smilax /data/key.pem
|
|
[edit]
|
http://curl.haxx.se/download.html <-- CURL Downloads for many platforms
|
|
[edit]
|
I keep getting errors. What am I doing wrong?
curl (26) failed creating formpost data for x in *.jpg do curl -F filestuff=@$x http://***:*****@centrisian.com/1.upload done
|
|
[edit]
|
semicolons before "do" and before "done".
Otherwise; I don't know -- here's the exact line I used this morning
for x in * ; do curl -F filestuff=@$x http://strick:********@wiki.yak.net/928.upload ; done |
|
[edit]
|
Fetching CURL on Ubuntu and probably any Debian:
sudo apt-get install curl |
|
[edit]
|
for x in *.jpg; do curl -F filestuff=@$x http://***:********@centrisian.com/9.upload ; done
This uploads images to 1.attach Any ideas? |
(last modified 2005-01-29) [Login] |