Simple Single File Upload

Thread is closed for posting
2 posts, 0 answers
  1. Jason Green
    Jason Green avatar
    4 posts
    Member since:
    Sep 2009

    Posted 01 May 2012 Link to this post

    I have been playing with the radUpload control, and I want to try to use it to allow users to upload a single file.  The file will be large, so I want to show the progress of the upload as it goes.  I thought this would be simple to do, but using the basic controls I can't seem to get it to work without throwing a java script error, and I never get the file.   

    Here is the code:
    <script type="text/javascript">
    //<![CDATA[
        function onClientProgressBarUpdating(progressArea, args) {
            progressArea.updateVerticalProgressBar(args.get_progressBarElement(), args.get_progressValue());
            args.set_cancel(true);
        }
    //]]>
    </script>
     
    <telerik:RadScriptManager id="ScriptManager1" runat="server" />
    <telerik:radupload id="Radupload1" runat="server" initialfileinputscount="1" MaxFileInputsCount="1" ControlObjectsVisibility="None" TargetPhysicalFolder="C:\Temp\UploadedFiles" />
    <asp:button id="buttonSubmit" runat="server" text="Submit" onclick="buttonSubmit_Click" cssclass="RadUploadSubmit" />
    <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
    <telerik:RadProgressArea id="RadProgressArea1" runat="server" CssClass="module" onclientprogressbarupdating="onClientProgressBarUpdating" ProgressIndicators="TotalProgressBar, TotalProgress, TotalProgressPercent, TimeEstimated, TransferSpeed" />

    Do you see what is wrong? 

  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 03 May 2012 Link to this post

    Hello,

    Could specify what is the experienced JavaScript error? Please note that by default the maximum allow size of the uploaded file is 4mb, so please review the following help article giving instructions which configurations should be altered in the web config file when uploading large files.

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top