Just what I was looking for. I'm new to C# and MVC Core so I appreciated the simple way the problem was solved in the first half. Then because of the first half, the refactored code made more sense. Nice job and thank you!
@CodingSquid5 жыл бұрын
Anyone have any tips on downloading images from an Azure container with private access level?
@CodingSquid5 жыл бұрын
// Class AzureBlobService method ListAsync (refactored version) modified to work with Azure private containers public async Task ListAsync() { // (Replace IFUserName with Identity Framework Username or some IF key) string SASPolicyName = "IFUserName"; CloudBlobContainer blobContainer = await _azureBlobConnectionFactory.GetBlobContainer(); // For Private container add custom policy for access BlobContainerPermissions containerPermissions = await blobContainer.GetPermissionsAsync(); // delete old SAS policy if it exists containerPermissions.SharedAccessPolicies.Remove(key: SASPolicyName); // Create new SAS policy containerPermissions.SharedAccessPolicies.Add(SASPolicyName, new SharedAccessBlobPolicy { // Client must be -1 though +1 hours of Azure server for download to authorize Permissions = SharedAccessBlobPermissions.Read, SharedAccessStartTime = DateTime.UtcNow.AddHours(value: -1), SharedAccessExpiryTime = DateTime.UtcNow.AddHours(value: 1) }); await blobContainer.SetPermissionsAsync(containerPermissions); // Gets all Cloud Block Blobs in the blobContainerName and passes them to the view List allBlobs = new List(); BlobContinuationToken blobContinuationToken = null; do { var response = await blobContainer.ListBlobsSegmentedAsync(blobContinuationToken); foreach (IListBlobItem blob in response.Results) { if (blob.GetType() == typeof(CloudBlockBlob)) { CloudBlockBlob cloudBlockBlob = (CloudBlockBlob)blob; string sharedAccessSignature = cloudBlockBlob.GetSharedAccessSignature(null, SASPolicyName); allBlobs.Add(new Uri(blob.Uri.ToString() + sharedAccessSignature)); } } blobContinuationToken = response.ContinuationToken; } while (blobContinuationToken != null); return allBlobs; }
@d0xalic4 жыл бұрын
Thanks for the explanatory video! Very appreciated. Just a small feedback, most of viewers put the speed on 1.5x and then the music gets really irritating, like others already mentioned. Just wanted to give this feedback. Otherwise great!
@Mafyou752 жыл бұрын
Amazing! Great Factory & Singleton with DI ;-) I wasn't prepare hahaha
@lisajongejans58184 жыл бұрын
Very helpful, thanks! Just the background music was a little distracting. But explanations were great.
@ramganapathy32984 жыл бұрын
Extremely detailed and useful video. Thanks for sharing it!!
@acousticbrothers14915 жыл бұрын
Hello sir, thanks for the great explanation, but I have a question. How can I check if my file is uploaded succesfully or not? Please help.. I found "isDeleted" property which I assume helps to check if it is deleted :) but I couldnt find one for the "uploadfromstream" method.
@bideveloper93254 жыл бұрын
Am facing same issue, did you resolved this, Actually I am trying to download from Sftp to azure blob storage, Can you help me
@acousticbrothers14914 жыл бұрын
@@bideveloper9325 I couldn't find a correct way to do that but I've simply changed a few things so dotnetfiddle.net/k5X8uo here is a small demo that you can use.
@bideveloper93254 жыл бұрын
AcousticBrothers ok, thank you
@glasuno96105 жыл бұрын
Nice work! Thanks for share that tutorial! SUPER HELPFUL!
@stevestrongbah26345 жыл бұрын
very good video, but next time please to not play music in the background
@larman363 жыл бұрын
Excellent! Thank you so much!!
@richmondng35673 жыл бұрын
Is this 100%working?
@nurda19975 жыл бұрын
Sorry Sir for inconvenience, I have a Books table, where I have Book Name, Author, Published Year, and Book's Image, My task is store Book's image in the Blob, Could please help me, sir? Thank you!!
@Kardenslayer4 жыл бұрын
Great serie! thanks for the videos
@ItsCmiHD5 жыл бұрын
Great video, I learned a lot. Can you do a tutorial with NoSQL on Azure?
@doannam6125 жыл бұрын
Great work! But I'm having trouble using it with Razor Page, more specifically, the [HttpPost] seems not working, would be great if you can help me with this
@doannam6125 жыл бұрын
@@BillyTech0 I'm using Razor Page to do it instead of the MVC, but seems like it's not working
@doannam6125 жыл бұрын
Nvm I've firgured it out, but thanks anyway
@jacobwest19554 жыл бұрын
@@doannam612 Do you have a GitHub that I could take a look at it on? I am also struggling with this fact.
@sayanduttamajumdar22992 жыл бұрын
where can I get the code?
@daled35024 жыл бұрын
Hi, Really good video.... Any chance of updating this video to use Azure.Storage.Blobs.. As the Windows.Azure.Stoarage is now deprrecated...
@bsnow78353 жыл бұрын
I agree..I cann find any photo gallery using Azure.Storage.blobs...any suggestions..Thanks
@lakshminarasimharaoyadaval41145 жыл бұрын
really really helpful..Thanks a lot for the nice work
@nurda19975 жыл бұрын
will it work if I deploy it on azure? not with localhost
@MrMukesh15044 жыл бұрын
instead of copying and writing code too fast, it would be nice if you can explain what are the different option and the purpose of the azure classes.
@vandeljasonstrypper67345 жыл бұрын
SignalR core can stream video now can you make an app demo that
@kumarRaj-zn2qk4 жыл бұрын
Good one!
@mohammednhari17375 жыл бұрын
Please, What’s a Continuation Token? Thannk you !
@mohammednhari17375 жыл бұрын
@@BillyTech0 Thank ! thank You ! well explained
@lokeshkumarchikkala52925 жыл бұрын
Great Work.
@johnny_rain32265 жыл бұрын
super helpful thank you!
@женягуньков4 жыл бұрын
I had problems with .NetCore 3.0. Routing has changed a bit and UploadAsync did not work out of box. Startup.cs -> ConfigureServices -> services.AddControllers(); Startup.cs -> Configure-> endpoints.MapControllers(); HomeController.cs -> add attribute [Route("Home/UploadAsync")] See more: docs.microsoft.com/en-us/aspnet/core/mvc/controllers/routing?view=aspnetcore-3.1