我创建了 Jenkins 来管理我的项目。我想与几个人分享这些文件。问题是 URL 是http://localhost:8080/。我怎样才能为我的同事公开(我希望像这边一样公开)?我知道配置中有“Jenkins URL”设置,但是当我将 URL 放在那里时,页面不存在。任何想法如何做到这一点?(我是这个东西的初学者,所以你能给我解释一下吗?谢谢)
我正在使用 W7 x64
我正在尝试从我的 Web 服务器下载文件夹,并且我想在进度条上显示下载了多少数据/总共下载了多少数据的进度。首先,我尝试使用WebClient.DownloadFile. 哪个工作完美,但没有触发DownloadProgressChangedEventHandler。我猜它只能通过异步下载激活。所以我已经将我的方法改写为WebClient.DownloadFileAsync. 这就是它变得复杂的地方。
例如,我的 Web 服务器上有 30 个文件,大小为 53 MB。我想下载所有 30 个文件并在进度条上显示下载进度(并在它下面显示带有 xx/53 MB 下载的标签)。
//Inicialized by opening dialog
private void DownloadForm_Shown(object sender, EventArgs e) {
WebClient client = new WebClient();
client.DownloadProgressChanged += client_DownloadProgressChanged;
client.DownloadFileCompleted += client_DownloadFileCompleted;
startDownload();
}
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) {
progressBar.Value = e.ProgressPercentage;
labelProgress.Text = String.Format("Downloaded {0} of {1} bytes", e.BytesReceived, e.TotalBytesToReceive);
}
private void startDownload() {
//files contains all URL links
foreach (string str in files) …Run Code Online (Sandbox Code Playgroud)