This is a migrated thread and some comments may be shown as answers.

upload widget with access to just camera and camera roll

4 Answers 672 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 25 Oct 2018, 08:24 AM

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

 

4 Answers, 1 is accepted

Sort by
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 25 Oct 2018, 08:25 AM
0
Dimitar
Telerik team
answered on 26 Oct 2018, 11:03 AM
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.
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 26 Oct 2018, 01:18 PM

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">

0
Dimitar
Telerik team
answered on 29 Oct 2018, 07:44 AM
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.
Tags
Upload
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Dimitar
Telerik team
Share this question
or