upload a file to crx via sling and webdav

###############################################################################################
# some variables and aliases
secret="admin:admin"
host="crunky"
port="7402"
path="content/test_2009_12_18"
base="http://${host}:${port}/${path}"
file="x.xml"
alias crx="curl -u ${secret}"

###############################################################################################
# make a directory to put junk in
crx -X MKCOL "${base}"

###############################################################################################
# put/get sling style 
crx -F"sling:resourceType=application/xml" -F"content=@${file}" ${base}/sling_test.xml
crx http://crunky:7402/content/test_2009_12_18/sling_test.xml/content

###############################################################################################
# put/get webdav style
crx -T ${file} ${base}/webdav_test.xml
crx http://crunky:7402/content/test_2009_12_18/webdav_test.xml
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: