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

Fixes Bad Request on Attachment Upload #164

Merged
merged 1 commit into from
May 16, 2022

Conversation

nefarius
Copy link
Contributor

@nefarius nefarius commented May 7, 2022

Fixes #163

CouchDB v3.2.1 (in my test scenario) refuses a document update when one or more attachments were added because of incomplete attachment meta data created by the serializer. I solved this by adding a JSON converter which ignores new attachments in the PUT request.

@nefarius nefarius changed the base branch from master to dev May 7, 2022 12:12
@matteobortolazzo
Copy link
Owner

Hi @nefarius, thanks a lot for the PR!

I get how this solves the 400, but if you ignore attachments, how do you upload them? Or I am missing something?

@nefarius
Copy link
Contributor Author

nefarius commented May 12, 2022

The upload happens in a separate call immediately after you submitted the document. The CouchDB Server then updates the document JSON with the new attachment.

This crashed before, now it works and then the attachment upload happens.

@matteobortolazzo
Copy link
Owner

My bad, it's so long I forgot!

Do you need a package release after the merge?

@nefarius
Copy link
Contributor Author

My bad, it's so long I forgot!

No worries, I'd like to see this lib come to perfection, and since I'll use it in an ongoing project I'll PR stuff if I find bugs 😁

Do you need a package release after the merge?

That would be delightful.

@matteobortolazzo matteobortolazzo merged commit e35c992 into matteobortolazzo:dev May 16, 2022
@matteobortolazzo
Copy link
Owner

Preview 3 uploaded 🙂 Thanks again!

@nefarius nefarius deleted the nefarius/issues/163 branch May 19, 2022 10:00
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.

Attachment upload not working
2 participants