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

    How to access extra-fields from QUploader

    Framework
    quploader
    2
    3
    791
    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.
    • G
      genyded last edited by

      How can the extra-fields data from the QUploader be access on the server? We tried by the fieldname, by the file->fieldname, and by ‘extra-fields’ and they all return null.

      1 Reply Last reply Reply Quote 0
      • F
        fakx last edited by

        Can’t you just dump the complete request object for manual inspection?

        G 1 Reply Last reply Reply Quote 0
        • G
          genyded @fakx last edited by genyded

          Thanks but we figured it out (FYI - the request object had {undefined: undefined}). There is no example in the Quasar docs and we thought it would just be key/value object pairs in the client array, but it’s actually a key value for the ‘name’ and key value for the ‘value’ ([{name: myKey, value: myValue}]) for each additional field. Not sure why it not just [{myKey: myValue}] which is a bit less verbose especially if you have several additional fields, but it works. So here is a sample of what it would look like:

          <q-uploader
                name="file"
                :additional-fields="[
                    {name: 'key1', value: 'value1},
                    {name: 'key2', value: 'value2}
                 ]"
                float-label="Some File"
                :url= "getRootURL + 'app/uploads'"
          />
          
          1 Reply Last reply Reply Quote 2
          • First post
            Last post