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

    Getting statics folder URL at runtime?

    Framework
    2
    4
    175
    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.
    • A
      ahmadx87 last edited by

      I’m using a thirdparty components that uses some media files (images, audio files, etc.). I should specify what the base url is for those files. For example if i pass to the media prop like so: media="/statics the component will append file name to it to set it as the url of the image or whatever it is (i.e /statics/img.jpg).

      I can’t get the files to load correctly. I think I should get the base url of the statics folder at run time and then pass it to the component. Am i right? How should I resolve this?

      1 Reply Last reply Reply Quote 0
      • Hawkeye64
        Hawkeye64 last edited by

        @ahmadx87 As of q/app v2.x, there is no longer a statics folder. It has been changed to public and is now a sibling to the src folder.
        Please check out the Upgrade Guide to see what else may impact you. https://quasar.dev/quasar-cli/app-upgrade-guide

        1 Reply Last reply Reply Quote 1
        • A
          ahmadx87 last edited by

          Thanks alot @Hawkeye64 I’ve just recently began using Quasar and had problems getting the file paths correctly. Looks like in v. 2 it is easier to deal with assets.
          I upgraded and it solved my frustration. 👍🎉

          1 Reply Last reply Reply Quote 0
          • Hawkeye64
            Hawkeye64 last edited by

            @ahmadx87 It is easier, especially if you have “extra” assets, like robots.txt, etc

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