mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
[Bug]: Inconsistent / Unexpected behaviour when adding attachments to cards via REST API #821
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomaslieffering on GitHub (Sep 24, 2025).
Where is the problem occurring?
I encountered the problem while interacting with the server (Backend)
What browsers are you seeing the problem on?
No response
Current behavior
Certain orderings of the multipart form parameters in the request body of a POST request to the
/api/cards/{cardId}/attachmentsendpoint results in inconsistent and unexpected behaviour.When trying to attach a file greater than 64kb, if the
nameparameter comes after thefileparameter eg. in Bruno:The following validation error is returned:
even though the request is valid.
Swapping the
fileparameter to be after thenameparameter fixes the issue eg. in Bruno:the request is successful
I initially came across this issue from PHP using Guzzle and have also replicated the error using cURL from the CLI so isn't an issue unique to Bruno
Desired behavior
The request is successful no matter the order of the multipart form request.
If this is not possible, that the significance of the order of the multipart form request is documented somewhere, such as the Swagger docs.
Steps to reproduce
The following cURL request reproduced the error:
where
plankaBaseUrl,token,cardIdandpath\to\local\fileare their respective values andtest.csvis a file which is > 64kBOther information
No response
@meltyshev commented on GitHub (Sep 24, 2025):
Hey! Thanks for reporting this. This happens because file uploads are handled by
sailshq/skipper, and that's just the way it processes text parameters: https://github.com/sailshq/skipper?tab=readme-ov-file#text-parameters. We probably need to make this clearer in our docs...