HtmlEditorImage

First and foremost, thank you for this entire library, it is absolutely amazing. I am still new at programming and still learning basics so, there's some things I simply do not know and therefore I apologize if the question is vague - please ask if there's more information needed!

Since we're wishing to use a Blob storage from Azure to store the images in, I am having trouble figuring out what to put as the Upload URL since I am using a separate Helper class to access everything in and from the Blob Storage.

blobstorerclass

I've looked at two posts whom are using API but, we're using a regular layout with a Data, Business and Web layer and Blazor server as the application.

So when I've attempted to put a [Route("uploadurl")] or [HttpPost("uploadurl")] then nothing happens. Am I missing something in my URL path or maybe in my setup of the RadzenHtmlEditor?

<RadzenHtmlEditor @bind-Value="Component.Content" UploadUrl="BlobStorer/UploadAsync" 
                                          style="height: 400px; margin-bottom: 1rem;"  >

This is the start of the method I wish the upload of an image needs to execute:
image

So my actual question might bound down to me not being extremely good at programming yet (still studying) and wondering if I should simply make a controller for that and/or if that'll even be helpful?

Hi @jeongoks,

You can check your browser's Network tab (in developer tools) to see if a request is being attempted for the upload. There is probably some HTTP error returned - 400, 404 or 500. Also make sure MVC controllers are enabled in your application.

Hi @korchev ,

I am indeed receiving a 400 error in the network tab - is this because the path isn't able to reach into my class because it's incorrent? Since it's never hitting my breakpoint in the start of the method.

Testing

i have this enabled in my Program.cs ;

app.MapControllers();

Could it be because it's 'only' a .cs file and not a .cshtml.cs file that the attributes won't function?

I got a bit further and actually hit the breakpoint, what I was missing was something rookie mistake :joy:

public class BlobStorer : Controller, IBlobStorer

It needed to inherit from the Controller class, which I was missing.
I will work forward and see if I can fix the next errors

Thank you for the help and quick response!