public static int ExecuteUploadAndReturnExitCode(UploadOptions options) { var file = new FileInfo(options.FileName); if (!file.Exists) { return(10); } Api.Api.Upload(file.FullName, options.Password, options.Expiration, options.MaxDownloads); return(0); }
} = -1; //if left @-1 there will be no cap on downloads public static int ExecuteUploadAndReturnExitCode(UploadOptions options) { var file = new FileInfo(options.FileName); if (!file.Exists) { return(10); } Console.WriteLine($"Uploading {file.FullName}"); Console.WriteLine($"Password: {options.Password}"); var success = Api.Api.Upload(file.FullName, options.Password, options.Expiration, options.MaxDownloads); Console.WriteLine(success); return(0); }