Accept image

2 posts, 0 answers
  1. Stein
    Stein avatar
    27 posts
    Member since:
    Apr 2008

    Posted 26 Jun 2015 Link to this post

    Is it possible to make AsyncUpload add the necessary properties to <input file>-tag, ref:

    , so that this will be the rendered html: <input type="file" tabindex="0" class="ruFileInput" name="radasyncUpload_1file0" id="radasyncUpload_1file0" size="23" accept="image/*"> 

    When uploading from a smartphone it would be better to go directly to the Gallery.

  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 30 Jun 2015 Link to this post

    Hi Stein,

    Try to add this attribute with jQuery:
    function pageLoad() {
        c = $find("");
        $('.ruFileInput').attr('accept', 'image/*');
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />

    Hristo Valyavicharski
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top