Curl

From knowledgebase
Revision as of 19:42, 27 August 2020 by Dirkjan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

curl -X PUT -H 'Content-Type: image/png' --data-binary @/mnt/newserver/shared/Fotos/200911\ -\ caro\ parijs/Foto0247.jpg http://tiddlyweb.vanwill.com/bags/common/tiddlers/test

 

1) First use curl to post username and password to the cookie_form and

store a cookie for it locally:

curl --cookie-jar cookies.txt -d "user=dirkjan&password= &submit=submit" http://tiddlyweb.vanwill.com/challenge/cookie_form

 

2) Pass the created cookie to subsequent post to upload tiddlers

 

curl --cookie cookies.txt -X PUT -H 'Content-Type: text/plain' --data-binary @  http://tiddlyweb.vanwill.com/bags/default/tiddlers/monkey