Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to add capture attribute to FileItem

    Hi,
    how can I add the attribute "capture" to a FileItem?
    <input type="FILE" ... class="uploadItem" multiple capture>

    Is this possible, maybe with a workaround?

    I would like to open the camera instantly on mobile devices.

    Any hints are appreciated.


    Regards
    John
    Last edited by JohnH; 24 May 2023, 03:47.

    #2
    We're looking into adding a setting to do this, but right now it would take an unsupported DOM-level hack to add the attribute.

    Regards
    Isomorphic Software



    Comment


      #3
      Thank you very much.
      In the meantime I'll help myself with javascript via JSNI and add the attribute to the generated FileItem.
      I'm looking forward to a direct implementation in SmartGwt.

      Regards
      John

      Comment


        #4
        Originally posted by Isomorphic View Post
        We're looking into adding a setting to do this, but right now it would take an unsupported DOM-level hack to add the attribute.
        Hello, any news in this regard?

        Comment


          #5
          Sorry for the delay on this. The new attribute, FileItem.capture, has been added to support this functionality. It will be available in tomorrow's builds, starting on September 8th.

          Take a look at the documentation of the new attribute in order to know how to use it with FileItems and UploadItems.

          Best Regards.
          Isomorphic Software

          Comment

          Working...
          X