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

Enrich removeBlobs command #24

Merged
merged 2 commits into from
Feb 3, 2025

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