Skip to content

Instantly share code, notes, and snippets.

@sauceaaron
Created April 9, 2019 17:51
Show Gist options
  • Save sauceaaron/61e89eab1ae8c69bdd52a22fed42517b to your computer and use it in GitHub Desktop.
Save sauceaaron/61e89eab1ae8c69bdd52a22fed42517b to your computer and use it in GitHub Desktop.
public class SauceStorageAPI
{
public String uploadAppToSauceStorage(String filename) throws IOException
{
System.out.println("uploading file to sauce storage: " + filename);
SauceREST api = new SauceREST(SAUCE_USERNAME, SAUCE_ACCESS_KEY);
File appLocalFile = new File(filename);
String appName = appLocalFile.getName();
System.out.println("appName: " + appName);
String uploadFileResponse = api.uploadFile(appLocalFile);
System.out.println(uploadFileResponse);
String getStoredFilesResponse = api.getStoredFiles();
System.out.println(getStoredFilesResponse);
return "sauce-storage:" + appName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment