Uncaught TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'

前端 未结 4 2216
名媛妹妹
名媛妹妹 2021-02-02 08:18

I\'ve got a problem with a javascript Filereader which returns the error Uncaught TypeError: Failed to execute \'readAsDataURL\' on \'FileReader\': parameter 1 is not of type \'

4条回答
  •  借酒劲吻你
    2021-02-02 08:27

    You have to trigger change event on input field. then you will receive file.

    $('#upload-button').click(function(){
        $('#my-custom-design-upload').trigger('change');                 
           return false;
        });
    

提交回复
热议问题