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
117 stars 13 forks source link

Custom Image upload api #32

Open RamType0 opened 1 month ago

RamType0 commented 1 month 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 1 month ago

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