Skip to content

Instantly share code, notes, and snippets.

@ndmanvar
Created January 5, 2017 18:02
Show Gist options
  • Save ndmanvar/c1598cf6ef7e8ec99f7734426a4d772c to your computer and use it in GitHub Desktop.
Save ndmanvar/c1598cf6ef7e8ec99f7734426a4d772c to your computer and use it in GitHub Desktop.
file_name = ARGV[0]
proposed_name = ARGV[1] || file_name.gsub(' ', '_')
`curl -u #{ENV['SAUCE_USERNAME']}:#{ENV['SAUCE_ACCESS_KEY']} \
-X POST \
-H "Content-Type: application/octet-stream" \
https://saucelabs.com/rest/v1/storage/#{ENV['SAUCE_USERNAME']}/#{proposed_name}?overwrite=true \
--data-binary @'#{file_name}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment