/** * Uploads a file to Sauce storage. * * @param file the file to upload * @param fileName name of the file in sauce storage * -param overwrite set to true * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file, String fileName) throws IOException { return uploadFile(file, fileName, true); }
/** * Uploads a file to Sauce storage. * * @param file the file to upload * @param fileName name of the file in sauce storage * -param overwrite set to true * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file, String fileName) throws IOException { return uploadFile(file, fileName, true); }
public static void uploadFile(File file) throws IOException { client.uploadFile(file); }
/** * Uploads a file to Sauce storage. * * @param file the file to upload * -param fileName uses file.getName() to store in sauce * -param overwrite set to true * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file) throws IOException { return uploadFile(file, file.getName()); }
/** * Uploads a file to Sauce storage. * * @param file the file to upload * -param fileName uses file.getName() to store in sauce * -param overwrite set to true * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file) throws IOException { return uploadFile(file, file.getName()); }
/** * Uploads a file to Sauce storage. * * @param file the file to upload * @param fileName name of the file in sauce storage * @param overwrite boolean flag to overwrite file in sauce storage if it exists * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file, String fileName, Boolean overwrite) throws IOException { try (FileInputStream is = new FileInputStream(file)) { return uploadFile(is, fileName, overwrite); } }
/** * Uploads a file to Sauce storage. * * @param file the file to upload * @param fileName name of the file in sauce storage * @param overwrite boolean flag to overwrite file in sauce storage if it exists * @return the md5 hash returned by sauce of the file * @throws IOException can be thrown when server returns an error (tcp or http status not in the 200 range) */ public String uploadFile(File file, String fileName, Boolean overwrite) throws IOException { try (FileInputStream is = new FileInputStream(file)) { return uploadFile(is, fileName, overwrite); } }