angular-file-upload icon indicating copy to clipboard operation
angular-file-upload copied to clipboard

Repeat the upload

Open lixiangyue opened this issue 8 years ago • 5 comments

Why can't upload the same file? then there's a problem! first, upload a file second, remove the file third, can't upload files the same as the first file.

lixiangyue avatar Nov 22 '17 07:11 lixiangyue

Why can't select the same file? then there's a problem! first, select a file second, select the file third, can't select files the same as the first file. 不能选择同一份文件的 不然会造成一个问题 1、选择一份文件 2、删除那份文件 3、再选择之前的那份文件 4、最终结果表格队列没有加到文件

lixiangyue avatar Nov 23 '17 01:11 lixiangyue

I have the same issue.

PaulDMendoza avatar Nov 27 '17 21:11 PaulDMendoza

Same issue... More exactly, I cannot upload the same file twice in a row: (I have set autoUpload: true, removeAfterUpload: true)

Now:

  1. Select File_A.txt -> success
  2. Select File_A.txt -> nothing happens; onWhenAddingFileFailed NOT invoked.
  3. Select File_B.txt -> success
  4. Select File_A.txt -> success

stevebelt avatar Nov 30 '17 22:11 stevebelt

Yeah, same issue. Can't upload the same file twice in a row. Very strange.

PaulDMendoza avatar Dec 01 '17 04:12 PaulDMendoza

I found a solution on the Net. I added this line of code and now I do not get this error.

FileUploader.FileSelect.prototype.isEmptyAfterSelection = function() { return true; // true|false }; This is based upon the following FAQ:

https://github.com/nervgh/angular-file-upload/wiki/FAQ#4-no-file-chosen-or-re-add-same-file

The FAQ says you could add the 'multiple' attribute to the INPUT element, but that did not work for me; I had to use the function-override instead.

stevebelt avatar Dec 01 '17 11:12 stevebelt