Skip to content

Conversation

@ticruz38
Copy link
Contributor

@ticruz38 ticruz38 commented Feb 3, 2025

As discussed in the previous PR. There should be an option to remove either all blobs in the editor, or only those that have failed. The removeBlobs command now has an errorsOnly parameter (default to false)

Also adding the url endpoint that failed in the file object parameter passed in onUploadError callback

- add errorsOnly option to removeBlobs
Copy link
Owner

@cesardeazevedo cesardeazevedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to change this line https://github.com/cesardeazevedo/nostr-editor/blob/main/src/__tests__/upload.test.ts#L105 to

    expect(spyUploadError).toHaveBeenCalledWith(editor, {
      uploadError: 'Error: Invalid file',
      url: 'https://localhost:3000',
    })

@cesardeazevedo cesardeazevedo merged commit 6cfe4c4 into cesardeazevedo:main Feb 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants