Navigation

    Quasar Framework

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

    Trigger file selection dialog from button (Solved)

    Help
    2
    5
    177
    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.
    • mboeni
      mboeni last edited by mboeni

      Hi there

      This seems to be trickier than I thought. I would like to trigger a file selection dialog by pressing the button as so:

      Annotation 2019-11-05 144009.png

      The result I want from that is the path to the local file.

      I have tried a few online examples of using the q-field with type=“file” and then hiding it but wasn’t able to get it working. Also I found the approach overly awkward. What is the proper way of doing this?

      cheers,
      Michael

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        have tried a few online examples of using the q-field with type=“file”

        You mean q-input, don’t you?

        Scott

        mboeni 1 Reply Last reply Reply Quote 0
        • mboeni
          mboeni @s.molinari last edited by

          @s-molinari yes, sorry! It’s <q-input type="file" .../>

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            Like this? https://codepen.io/smolinari/pen/abbYdMK?editors=1010

            Scott

            mboeni 1 Reply Last reply Reply Quote 0
            • mboeni
              mboeni @s.molinari last edited by

              @s-molinari Yep, exactly like that! Thanks 🙂

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