django file upload from json

前端 未结 1 1829
天命终不由人
天命终不由人 2021-01-27 08:54

Hi i have given the complete code for my file upload .But in my views i am just trying to return a response and get the alert on the UI.But none of the return statements are wor

1条回答
  •  半阙折子戏
    2021-01-27 09:24

    Check that you have no errors in web browser console. Perhaps the problem in ajaxSubmit function. Try change ajaxSubmit to:

    $.ajax({
        url: form.attr('action'),
        data: form.serialize(),
        type: 'POST',
        success: function(data){
            alert(data);
        }
    });
    

    and check result.

    0 讨论(0)
提交回复
热议问题