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
[bug] Media upload using Tokodon client fails #1944
Comments
Hm and a kinda related issue happens when uploading an avatar or a banner for the profile. Here gotosocial requires this header: |
Hmm, looking at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition makes me think this is likely a bug in Tokodon, since it seems according to the reference that |
Hm yeah that sounds more like a Tokodon bug. I will report back when I received any feedback from them if its a bug or not. The Tokodon code is pretty low level (the requests are just concatenated strings) so fixing this on their side is pretty simple as there is no struct parsing magic etc. xD |
This second one is a bug on our side. |
Ah thanks @daenney, i missed that part. |
The issue was resolved in tokodon. I will open another issue here for the second bug. |
Describe the bug with a clear and concise description of what the bug is.
Attaching media files using "Tokodon" fails with invalid request 400.
What's your GoToSocial Version?
main
GoToSocial Arch
No response
What happened?
Tokodon sends media using
Content-Disposition: attachment; name="file"; filename="NAME.png"
What gotosocial expects is
Content-Disposition: form-data; name="file"; filename="NAME.png"
Patching Tokodon to use
form-data
fixes the media upload (tested pictures and videos) so this is indeed the issue.Question is if this is a bug in Tokodon or in gotosocial and how hard it is to implement a workaround in gotosocial.
I have no knowledge in go so I cannot figure it out. No idea how to convince
File *multipart.FileHeader form:"file" binding:"required"
ofAttachmentRequest
to acceptattachment
.What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: