upload widget with access to just camera and camera roll

5 posts, 0 answers
  1. Morten
    Morten avatar
    349 posts
    Member since:
    Jul 2012

    Posted 25 Oct 2018 Link to this post

    Hi support,

    is it possible to limit what the Android/iOS device presents when the "select pictures" is clicked and the kendo upload widget initiates the "camera or pictures" view on the device?

    We have a customer that prevents access to the camera on user tablets because their Android devices appear to also give access to the file system (not just the camera and the camera roll). See screen shot.

    I'm thinking that the control of the content of the "select picture or camera" dialog is handed over to the device and that their device control system (www.soti.net) should prevent the user's access to the file system.

    Best regards

    Morten

     

  2. Morten
    Morten avatar
    349 posts
    Member since:
    Jul 2012

    Posted 25 Oct 2018 in reply to Morten Link to this post

    screenshot
  3. Dimitar
    Admin
    Dimitar avatar
    487 posts

    Posted 26 Oct 2018 Link to this post

    Hi Morten,

    Kendo Upload uses an input type="file" element as a basis for uploading. There is no particular Upload approach to limit this behavior, so limiting it should come from limiting it for an input type="file". I searched for such an approach and it is suggested to set attributes accept="image/*" and capture="camera" . The following Dojo snippet shows this in action. Open its Fullscreen version on a mobile device to test it on your side. I hope it will help you to achieve the desired behavior.

    Best regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Morten
    Morten avatar
    349 posts
    Member since:
    Jul 2012

    Posted 26 Oct 2018 in reply to Dimitar Link to this post

    I did a bit of research and it appears that the interpretation of a html tag is handled by either the browser, the device or the OS or a combination (I not sure).

    On a Huawai Android phone in a Chrome browser the tag below opens the camera.

    On the same device in a Firefox browser the tag pops up a dialogue from which the camera and the file system is accessible.

    <input name="files" id="files" class="kendo-upload" type="file" accept="image/*" capture="camera">

  5. Dimitar
    Admin
    Dimitar avatar
    487 posts

    Posted 29 Oct 2018 Link to this post

    Hi Morten,

    Indeed, there is no unified approach to handle this behavior, as it is not supported on all devices and platforms.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top