jQuery UI Widgets Forums Editors FileUpload csrf token POST request

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 1 year, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • csrf token POST request #101430

    SJ
    Participant

    Hi,

    I have handled the csrf issue but i am getting this exception and because of this issue all the upload events call twice.
    Please let me know where i need to set the fileName value.

    Uncaught TypeError: Cannot read property 'fileName' of undefined
        at HTMLIFrameElement.<anonymous> (jqxfileupload.js:formatted:703)
        at HTMLIFrameElement.dispatch (jquery-1.11.1.js:4641)
        at HTMLIFrameElement.elemData.handle (jquery-1.11.1.js:4309)
    var token = $("input[name='_csrf']").val();
    var header = "_csrf";
    var uu = 'uploadFile?' + header + "=" + token + "&selectedProjectId=" + document.getElementById("selectedProjectId").value + "&libName=" + selectedLibrary;
    
    $(‘#jqxFileUpload’).jqxFileUpload({
    width : 300,
    theme : ‘bootstrap’,
    browseTemplate : ‘default’,
    uploadTemplate : ‘default’,
    cancelTemplate : ‘default’,
    accept : ‘.txt,.xlsx,.xls,.xpt,.sas7bdat,.sas7bcat,.csv,.zip’,
    fileInputName : ‘fileInput’,
    uploadUrl : uu
    });
    

    Thanks,
    Shweta

    csrf token POST request #101476

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

You must be logged in to reply to this topic.