-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unable to deserialize type [CompletedFileUpload attachment]: No default constructor exists #835
Comments
CompletedFileUpload is specifically for form data. It is not currently supported for web sockets. |
@yawkat So how can I get form data from front? I need to get files from |
So for everyone who meets the task of saving files in websocket, I didn't find any other solution except posting to controller with CompletedFileUpload and returning id of created message and then adding text to this message in websocket (or creating new message without files in websocket) |
out of curiosity, how are you sending form data on websockets? ive never heard of this pattern |
I needed to create chat where people can attach files, so I thought I could do it on websockets |
I'm wondering what you did on the client side to send form data over websockets |
Expected Behavior
I want to get messageDto from frontend in my websocket
MessageParamsDto:
Actual Behaviour
I get error
io.micronaut.http.codec.CodecException: Error decoding stream for type [class com.example.message.dto.MessageParamsDto]: Unable to deserialize type [CompletedFileUpload attachment]: No default constructor exists
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.3.6
The text was updated successfully, but these errors were encountered: