Home > front end >  El - upload to add the same image do not repeat the same photographs add
El - upload to add the same image do not repeat the same photographs add

Time:05-14

How does  , seek help from bosses

CodePudding user response:

On judgment - change event in the list whether there is a file with the current "same", if there is removed from the file list, then the last one to go

Mainly to judge whether there is "the same" file, to accurately, the following simple example is from the file name and file size to do a simple judgment, the more precise from file. You can take a few more attributes in the raw, such as the judge under the raw lastModified, lastModifiedDate, name, size, type, whether are the same

: on - change="handleChange"

 
HandleChange (file, a list) {
Const filterRes=list. The filter (f=& gt; The cash-strapped ame===file. The name & amp; & F.s considering===file. The size)
FilterRes. Length & gt; 1 & amp; & List. The pop ()
}

CodePudding user response:

Before uploading, can try to determine name and picture information according to the pictures
  • Related