Right way to send files to edge function
# help-and-questions
o
I have this inside my edge function: --- const { my_files} = await req.json(); return new Response( JSON.stringify({ files: my_files, }) ); --- and im calling that function this way: --- let { data, error } = await supabase.functions.invoke("files-function", { body: { my_files: my_input.target.files }, }); --- but if I send N files, my edge function receive and return N empty objects. For example: sending 4 files, returns { my_files: [ {}, {}, {}, {} ] } sending 2 files, returns: { my_files: [ {}, {} ] } what is the right way to send files to my edge function?
v
@osamita did you test the function from postman?