Getting upload file arrayBuffer server side in validation function fails with "Attempted to call a temporary Client Reference" #10038
Labels
status: needs-triage
Possible bug which hasn't been reproduced yet
Describe the Bug
I have an upload collection that I validate with a sibling checkbox field. The checkbox field has a validation method which checks the
options.siblingData.file
when it is populated and runs some file validations with the underlying File object.This used to work in V2, but in V3 when trying to migrate my logic I end up with the error
Error: Attempted to call a temporary Client Reference from the server but it is on the client.
(Maybe I am abusing an API that is not supposed to be public, if so please suggest an alternative that would allow me to validate a file server-side, loading the Blob in memory. I also explored
hooks.beforeOperation
but could not give nice validation feedback in the UI to the user using it)Link to the code that reproduces this issue
sacha-c@b119e4e
Reproduction Steps
Have a collection with an upload configuration & a sibling field with a validation method that attempts to access the
arrayBuffer
promise (or thestream()
ortext()
methods also)Logs:
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: