我在我的上传应用程序中创建了一个函数,每次都会在文本文件 (txt) 中写入最新图像的完整 URI
CloudBlobClient blobClient = new CloudBlobClient(
sUrl, new StorageCredentialsSharedAccessSignature(signature));
CloudBlobContainer container = blobClient.GetContainerReference(container1);
CloudBlobDirectory dir = container.GetDirectoryReference(cameranaam);
CloudBlob cloudBlob = dir.GetBlobReference(cameranaam+".txt");
cloudBlob.UploadText(blobSAS.Uri.ToString());
这是我的另一个项目的计时器,它正在加载服务器的最后一个图像:
blobClient = new CloudBlobClient(
blobstoreurl, new StorageCredentialsSharedAccessSignature(signature));
container = blobClient.GetContainerReference(containerName);
CloudBlobDirectory dir =
container.GetDirectoryReference(comboBoxCameras.SelectedItem.ToString());
CloudBlob cloudBlob = dir.GetBlobReference(
comboBoxCameras.SelectedItem.ToString().Replace(" ","") + ".txt");
pictureBoxLiveViewer.ImageLocation = cloudBlob.DownloadText() + signature;