No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    problems with uploader

    Help
    2
    3
    59
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zeppelinexpress last edited by zeppelinexpress

      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.
      Screenshot_1.jpg

      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”

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @zeppelinexpress last edited by

        @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.

        1 Reply Last reply Reply Quote 1
        • Z
          zeppelinexpress last edited by

          field-name=“profile_pic” <- worked.
          thank you very much

          1 Reply Last reply Reply Quote 0
          • First post
            Last post