erossini / BlazorMarkdownEditor

Complete Markdown Editor component for Blazor WebAssembly and Blazor Server. Full of functionalities
https://www.puresourcecode.com/dotnet/blazor/markdown-editor-component-for-blazor/
MIT License
139 stars 20 forks source link

Custom Image upload api #32

Open RamType0 opened 5 months ago

RamType0 commented 5 months ago

Current image upload API has very limited functions for customization. It always requires fixed request body format and fixed response format. And also, required response format is not documented at all. I want much simple, and customizable API such as


async Task<string> OnImageAttached(byte[] fileContent, string contentType)
{
   var media = await MyApi.UploadImageAsync(contentType, fileContent);
   var relativeUrl = $"/Media/{media.Id}";
   return relativeUrl;
}

Then this will be inserted to markdown

![](/Media/{media.Id})
erossini commented 5 months ago

I'll add it to the list of the features. Thank you for the message. Enrico