Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown: ImageUploadChanged with multiple files fix #5975

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@

<DocsPageSection>
<DocsPageSectionHeader Title="Upload image">
Uploading image has a similar API to our FileEdit component and it is fairly simple to do.
Uploading an image has a similar API to our <Code>FileEdit</Code> component and is fairly simple to use.
<Strong>Note that</Strong> the events related to file uploads fire separately for each file instead of grouping them.
This behavior comes from the underlying Easy Markdown Editor, which processes files individually.
</DocsPageSectionHeader>
<DocsPageSectionContent Outlined FullWidth>
<MarkdownUploadImageExample />
Expand Down
4 changes: 3 additions & 1 deletion Source/Extensions/Blazorise.Markdown/wwwroot/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export function initialize(dotNetObjectRef, element, elementId, options) {
imageUploadNotifier.onError = onError;

// Reduce to purely serializable data, plus build an index by ID
element._blazorFilesById = {};
if (element._blazorFilesById == null) {
element._blazorFilesById = {};
}

var fileEntry = {
id: ++nextFileId,
Expand Down
Loading