![](/img/trans.png)
[英]How can i change 'ng2-file-upload' default behavior to change the name attribute of the file input to 'file'
[英]How to get error logs in NPM ng2-file-upload in Angular 5?
我正在使用 npm ng2-file-upload
package 將圖像文件上傳到 S3。
我正在使用onErrorItem
掛鈎來了解是否有任何錯誤,並且我將item.isError
設為true
,
this.uploader.onErrorItem = ((item, response, status, headers): any => { // response=""; status=0; headers={};
console.log(item.isError); // true
});
這意味着,文件上傳失敗。 我還檢查了 S3,沒有文件。 但是,object item
中沒有關於失敗的錯誤日志。
順便說一句,我正在上傳一個帶有預簽名 URL 的文件。 這是Github 參考
那么,誰能告訴我,在 S3 中上傳文件失敗后,如何在ng2-file-upload
中查看錯誤日志?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.