jQuery UI Widgets Forums ASP .NET MVC jqxFileUpload – unexpected end of json …

This topic contains 1 reply, has 2 voices, and was last updated by  Todor 5 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Neil Leininger
    Participant

    I am getting a unexpected end of json error when using the control with a file size of 31M. When I decrease the size of the to around 4 MB, it works without any error. I have already increased the my httpRuntime maxRequestLength to 2097151, or 2G.

    Is there a maximum file size for the control?

    Here is my code

    
    <div style="padding-left:15px; padding-right:15px; padding-top:5px; height:100%">
        <div id='jqxWidget' style=" font-size: 13px; font-family: Verdana;">
            <div style='margin: 10px;'>
                <h7>Upload Test Scripts</h7>
            </div>
            <p />
            <div style='margin: 10px;'>
                <div id="jqxFileUpload"></div>            
            </div>
        </div>
    </div>
    
    <script type="text/javascript">
        var testScriptID = "";
        var moduleName = "";
        var featureName = "";
        var tagName = "";
        var step = "";
        var newTags = [];
        var moduleFeatures = [];
        $(document).ready(function () {
            $("#jqxWidget").jqxPanel({ width: '100%', height: 875 });
    
            $("#jqxFileUpload").jqxFileUpload({
                width: '25%',
                uploadUrl: '@Url.Action("Upload", "QARep")',
                fileInputName: 'filesToUpload',
                localization: {
                    browseButton: 'Select File'
                },
                theme: 'energyblue'
            });
    
            $("#jqxFileUpload").on("uploadEnd", function (event) {
                var args = event.args;
                var response = args.response.split(">");
                var json = response[1].split("<");
    
                var result = JSON.parse(json[0]);
                showNotification(result.State, result.Message);
                if (result.Data !== null) {
                    var url = '@Url.Action("Detail", "TestScript")/' + result.Data;
                    location.href = url;
                }
            });
        });
    </script>

    Todor
    Participant

    Hello Neil,

    No, there is no maximum file size for the control. There are no restriction by size for jqxFileUpload.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.