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

Accept image

1 Answer 47 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Stein
Top achievements
Rank 1
Stein asked on 26 Jun 2015, 01:45 PM

Is it possible to make AsyncUpload add the necessary properties to <input file>-tag, ref: http://www.w3schools.com/tags/att_input_accept.asp

, 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.

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 30 Jun 2015, 07:09 AM
Hi Stein,

Try to add this attribute with jQuery:
function pageLoad() {
    c = $find("");
    $('.ruFileInput').attr('accept', 'image/*');
}
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <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" />
            </Scripts>
        </telerik:RadScriptManager>


Regards,
Hristo Valyavicharski
Telerik
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
Tags
AsyncUpload
Asked by
Stein
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or