Description
Can't send ArrayBuffer to Server Action despite react.dev saying that you can. I'm not sure if this is an error or my part or the documentation. I retrieved the arrayBuffer from file of formData, then pass it through the parameter of the Server Action.
It seems like it doesn't get sent to the server because it can't be parsed due to ArrayBuffer being serializable but not iterable.
However this is somewhat confusing because you can attach File in FormData in the form of Blob and send it to the Server Action.
I understand that FormData is handled separately but I'm not sure I understand why it can't be done the same with ArrayBuffer.
I understand that I can just pass the FormData to send files but In my case I needed to transform the Files first before uploading and it ends up with a Blob.
React version:
Steps To Reproduce
- Create form, input, submit button, and also onSubmit function using Client Action
- Retrieve the arrayData from the formData then pass it to server action
Link to code example:
https://codesandbox.io/p/devbox/nextjs-arraybuffer-server-action-36gvxn
The current behavior
Throws client-side error
The expected behavior
ArrayBuffer gets sent to the server
The documentation:

Please let me know if I fail to understand the documentation or if it's something wrong in the documentation