MaxFileCount properties don't work on files upload completed

Web Tips Q & ACategory: Krajee PluginsMaxFileCount properties don't work on files upload completed
stone5751 asked 2 years ago

MaxFileCount properties working on select one file when it upload yet. But MaxFileCount properties don’t work on a uploaded file.
For example:

  1. I selected one image file(test.jpg) into input tags.
  2. It’s max file conut is 1.
  3. I select another image file(abc.jpg) into input tags.
  4. Page titps: Number of files selected for upload (2) exceeds maximum allowed limit of 1.
  5. It’s work Good!
  6. I upload test.jpg image file when I clicked “Upolad file” button.
  7. I select another image file(abc.jpg) into input tags.
  8. The second file can be added.
  9. This file(abc.jpg) should not be added, because a file(test.jpg) had been added.

Can you help me resolve it?
It’s my angularjs code:


Start your code here
$scope.options = {
language: "zh",
showUpload: true,
maxFileCount: 1,
uploadUrl: "/operation/api/attachment",
uploadAsync: true,
previewFileType: 'any',
maxFilePreviewSize: 5 * 1024 * 1024,
initialPreview: initialPreview,
initialPreviewConfig: initialPreviewConfig,
overwriteInitial: false,
initialPreviewShowDelete: true,
validateInitialCount: true
};

 

Login or register to contribute or comment.

Login   Register