gotosocial
gotosocial copied to clipboard
[bug] POST /api/v1/admin/custom_emojis does not work without a filename
Describe the bug with a clear and concise description of what the bug is.
GtS appears to fail to parse the image multipart item if a filename attribute is not included. It returns a someone confusing error like this Bad Request: invalid character '\\u0089' looking for beginning of value
. My impression is the filename parameter of the multipart item is supposed to be optional.
What's your GoToSocial Version?
v0.13.2
GoToSocial Arch
amd64
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
No response
Heya, this is very similar to https://github.com/superseriousbusiness/gotosocial/issues/1958, which was also about media uploads not succeeding without a filename. The upshot was that doing it without filename will require a lot of hacking around with our dependencies and whatnot: https://github.com/superseriousbusiness/gotosocial/issues/1958#issuecomment-1673251050 So, not something we really have time to fix at the moment. If you're doing this as part of s script, could you work around by just including filename? I believe it doesn't even matter what the filename is, for the most part.
Yes, I programmed a work around in my tool. Even if this can't be fixed, it would be nice if a better error was returned. Or at the very least add a note in the API docs so future scripters don't get stuck like I did.
Added a warning/tip for the filename thing here which links back to this and the related issues.