Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created February 27, 2013 17:54
Show Gist options
  • Select an option

  • Save chmouel/5049987 to your computer and use it in GitHub Desktop.

Select an option

Save chmouel/5049987 to your computer and use it in GitHub Desktop.
#!/bin/bash
TOKEN=56fa2267946c42dbbc4b6fbcb017650e
URL=https:/URL/STORAGE50GO
FILE=/tmp/monfichier.jpg
filename=$(basename ${FILE})
curl -H "X-Auth-Token: ${TOKEN}" ${URL}
curl -X PUT -H "X-Auth-Token: ${TOKEN}" ${URL}/newcontainer
curl -X PUT -T ${FILE} -H "X-Auth-Token: ${TOKEN}" ${URL}/newcontainer/${filename}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment