'append' called on an object that does not implement interface FormData

前端 未结 5 1738
误落风尘
误落风尘 2020-12-02 09:57

I\'m Trying to upload image on with jquery and ajax. But weird thing happened here. In console Log its showing

TypeError: \'append\' called on an obj

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 10:10

    Just edit your line:

    var postData = new FormData(this);
    

    to:

    var postData = new FormData($(this));
    

提交回复
热议问题