UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Download a file using webapp-container

    App Development
    sorry
    3
    8
    297
    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.
    • B
      boky
      last edited by

      Hey. Tell me how to download a file using webapp-container in /home/phablet/Downloads ?

      Exec=webapp-container --webappUrlPatterns="title.name" --enable-back-forward http://my-site.com
      

      If possible using webapp-container.
      Sorry, I could not find webapp-container -h

      1 Reply Last reply Reply Quote 0
      • dobeyD
        dobey
        last edited by

        Are downloads not working in the webapp?

        B 1 Reply Last reply Reply Quote 0
        • B
          boky @dobey
          last edited by

          @dobey loading in
          /.local/share/name.click

          1 Reply Last reply Reply Quote 0
          • dobeyD
            dobey
            last edited by

            OK. So, apps (that includes webapps) are confined in UT. They are not allowed to read/write into the normal Downloads folder. There is no special option to webapp-container that changes this.

            1 Reply Last reply Reply Quote 0
            • B
              boky
              last edited by

              hmm ... this is how Morph is used, which has access to the Downloads.
              Local_St.png
              Or there special restriction.

              dobeyD 1 Reply Last reply Reply Quote 0
              • dobeyD
                dobey @boky
                last edited by

                @boky LocalStorage has nothing to do with file downloads. It's a method of storing data such as settings or such, on web sites, in a local database.

                Yes, the main Morph browser is a privileged case, so file downloads with it will go into the Downloads folder.

                arubislanderA 1 Reply Last reply Reply Quote 0
                • arubislanderA
                  arubislander @dobey
                  last edited by arubislander

                  @dobey said in Download a file using webapp-container:

                  Yes, the main Morph browser is a privileged case, so file downloads with it will go into the Downloads folder.

                  But why, though? Wouldn't it have been perfectly OK for Morph to also download in it's own private folder? The files could have been exported from there to another location on the filesystem via Content Hub (as they already can be currently)

                  πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                  Happily running Ubuntu Touch
                  BQ Aquaris M10 FHD (16.04 RC)
                  Google Pixel 3a (20.04 DEV)
                  JingPad (20.04 DEV)
                  Meizu Pro 5 (16.04 DEV)
                  PinePhone / PineTab UT CE (20.04 daily)

                  dobeyD 1 Reply Last reply Reply Quote 0
                  • dobeyD
                    dobey @arubislander
                    last edited by

                    @arubislander said in Download a file using webapp-container:

                    But why, though? Wouldn't it have been perfectly OK for Morph to also download in it's own private folder? The files could have been exported from there to another location on the filesystem via Content Hub (as they already can be currently)

                    I don't know the specifics of why things work this way in regards to webapp-container/morph. IMO, the current behavior is wrong. But if one wants to change it, they should open an issue about the behavior on github. This isn't the place to resolve that.

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