
- Netdrive as a service software#
- Netdrive as a service download#
- Netdrive as a service free#
- Netdrive as a service windows#
However, this is the first and only time we will come across a “reference”. Again, most of the method is simply gathering the proper data, while the Storage library simplifies the operation into one call ( blobReference.UploadFromFileAsync).
Netdrive as a service download#
Similar to the download method, the upload method prompts the user for a file, and uploads the file into a blob of the same name into the, currently selected, directory. Var blobReference = container.GetBlockBlobReference($"") Īwait blobReference.UploadFromFileAsync(filePath) Var fileName = filePath.Split(System.IO.Path.DirectorySeparatorChar).Last() Var container = client.GetContainerReference(containerName) Var (containerName, directoryName) = GetContainerAndDirectory(item) async void UploadButton_Click(object sender, RoutedEventArgs e) Upon selecting a directory, the “upload” button enables the user to select a file and upload it into the Storage directory. The real meat of this method is performed during blob.DownloadToFileAsync the rest of the method is just gathering the proper information.īoth async and await have drastically simplified UI thread updates in presentation frameworks, so setting the status text and using await gives us the desired UI results.ĭownloading blobs is only half the excitement: we need the ability to upload blobs, as well. This method takes the currently selected BlockBlob, displays a prompt to the user, and downloads the blob to the selected file. Var item = View.SelectedItem as TreeViewItem Īwait blob.DownloadToFileAsync(saveFileDialog.FileName, FileMode.Create) async void DownloadButton_Click(object sender, RoutedEventArgs e) As I mentioned earlier, Blob storage makes this task excessively simple. The first of our three action buttons downloads a blob. Now that we have built the TreeView, we need to start implementing our Storage commands. Subsequent to BuildTree, we essentially have the structure of our TreeView. The above two listings takes a flat list of blobs.

Var blob = g.FirstOrDefault(b => b.Name = g.Key)?.Blob Name = b.Name.Substring(g.Key.Length + 1), Var children = g.Where(b => b.Name.Length > g.Key.Length + 1).Select(b => new TreeViewBlob The TreeViewBlob is just a convenient representation for the following tree building algorithm. var blobs = container.ListBlobs(useFlatBlobListing: true) First, we must obtain a flat list of the blobs in the container. In a stroke of ingenuity, I decided to represent the containers, directories, and blobs as a TreeView.Īs expected, we must build a tree for each container. Representing the Account as a TreeViewĪt its core, the app needs to display the current state of the blob account in a human-consumable fashion.
Netdrive as a service windows#
NET app type including Windows Forms, ASP.NET, Console, etc. While I made the choice to build this sample in WPF, the Azure Storage portions work with any. I’ll build this app in WPF using Visual Studio 2017 and the Azure Storage for. We are going to build this app as it was in its glory days, which means we need a few things. I took my partial memory of the general skeleton of the former masterpiece and rewrote it using Blobs as the backing file store.
Netdrive as a service free#
In the past, network drives did the trick, but Azure Storage offers users automatic backups, better flexibility and global availability, all at a very low cost (or no cost if you are using free Azure credits).
Netdrive as a service software#
Fortunately, I think we can reinvent this magical piece of software (albeit to a scoped degree) with Azure Blob Storage. Unfortunately, that particular app has long since been erased from whichever hard drive it was initially birthed. When I was in university I found myself constantly coding for fun, and one example took the form of a network share for my roommates to share files wrapped in a handy little app. Many applications make use of a network drive to backup and store files.
