Uploading file via Rest API but giving error

Hello,
I have created a component named as fileInput1 , while submitting it through Api
giving error "The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined"

I am using {{fileInput1.files}}

Hello !!! Need of urgent help. Please see if someone could help me.

Many Thanks in advance!!!

:wave: Hey Varsha,

would be good to include a bit more information about your setup so we can figure out how you're doing what you're doing :))

Give this thread a read, should be what you're looking for!

{{ {...fileInput1.files[0], "data": fileInput1.value[0] } }}

Great many Thanks @minijohn !!!! It is working for me .

1 Like