Skip to content
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
8 changes: 4 additions & 4 deletions packages/core/src/editor/BlockNoteEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,15 @@ export class BlockNoteEditor<

if (newOptions.uploadFile) {
const uploadFile = newOptions.uploadFile;
this.uploadFile = async (file, block) => {
this.uploadFile = async (file, blockId) => {
this.onUploadStartCallbacks.forEach((callback) =>
callback.apply(this, [block])
callback.apply(this, [blockId])
);
try {
return await uploadFile(file, block);
return await uploadFile(file, blockId);
} finally {
this.onUploadEndCallbacks.forEach((callback) =>
callback.apply(this, [block])
callback.apply(this, [blockId])
);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const UploadTab = <

if (editor.uploadFile !== undefined) {
try {
let updateData = await editor.uploadFile(file);
let updateData = await editor.uploadFile(file, block.id);
if (typeof updateData === "string") {
// received a url
updateData = {
Expand Down
Loading