problems with uploader
-
I’m trying to send a profile pic to my backend api.
when I send on Insomnia as Multipart form and form URL encoded, it’s working.
well, now I don’t know how to set the parameters with Uploader, follow my code:
<q-uploader class="q-ma-md" style="max-width: 300px" method="POST" url="http://localhost:3333/upload" label="Add" accept=".jpg, image/*" />
I really don’t know where I set the key of body request “profile_pic”
-
@zeppelinexpress Try setting
<q-uploader class="q-ma-md" style="max-width: 300px" method="POST" url="http://localhost:3333/upload" label="Add" accept=".jpg, image/*" :field-name="profile_pic" />
Not positive that’s the correct parameter, since I usually have not used QUploader, but it might work.
-
field-name=“profile_pic” <- worked.
thank you very much