Seven cows jssdk upload encountered Duplicate file error problem.

  node.js, question

1. Problem description:
The whole process is as follows: upload to the seven cow space using the seven cow jssdk. For example, the uploaded picture is 1.jpg. After uploading, the server writes the interface to delete the files in the seven cow space. The ajax interface was called earlier to delete the 1.jpg just now. At this time, the user found that he had made a mistake in deleting and needed to upload 1.jpg again. Then he will report the mistake.
2. Code:
Front-end upload

var obj_stepup = new QiniuJsSDK(),
 par_stepup = pubFun.pubqiniuup({
 browse_button: 'stepthumb',
 container: 'stepthumbparent',
 drop_element: 'stepthumbparent',
 domain: 'http://oev0goahc.bkt.clouddn.com',
 get_new_uptoken: false,
 auto_start: true,
 log_level: 5,
 unique_names: false,
 save_key: false ,
 multi_selection:false,
 filters : {
 max_file_size : '100mb',
 prevent_duplicates: true,
 // Specify what files to browse for
 mime_types: [
 {title: "imagefiles", extensions: "jpg,gif,png"}//qualify jpg, gif, png suffix upload
 bracket
 },
 uptoken_func: function(){
 var obj_token={};
 $.ajax({
 url:'file/gettoken',
 type:'post',
 data:{space:'stepimgspace'},
 async:false,
 success:function(_data){
 if('suc'==_data.msg){
 obj_token['uptoken'] = _data.data.uptoken;
 bracket
 },
 error:function(){
 
 bracket
 });
 return obj_token.uptoken;
 },
 init: {
 'FilesAdded': function(up, files) {
 
 },
 'UploadComplete': function() {
 
 },
 'FileUploaded': function(up, file, info) {
 
 },
 'Error': function(up, err, errTip) {
 console.log(789,up,err,errTip)
 },
 'Key': function(up, file) {
 var key = file.name;
 //  do something with key
 return key
 bracket
 bracket
 }),
 setpupload = obj_stepup.uploader(par_stepup);

Remove ajax:

$.ajax({
 url:'file/delqiniu',
 data:{data:JSON.stringify(par.obj_imgname)},
 success:function(_data){
 
 },error:function(){
 
 bracket
 });

Background deletion method:

delqiniu(_this,_call){
 let i=0;
 let obj_arr = [];
 qiniu.conf.ACCESS_KEY = '****************************************';
 qiniu.conf.SECRET_KEY = '****************************************';
 //build bucketmanager object
 let client = new qiniu.rs.Client();
 let obj_data = JSON.parse(_this.paramValue('data'));
 for (let value in obj_data) {
 obj_arr.push(obj_data[value]);
 bracket
 //The space you want to test, and this key exists in your space
 let bucket = obj_data.space;
 function removefile(){
 var key = obj_arr[i];
 client.remove(bucket, key, function(err, ret) {
 if (!  err) {
 Icaga;
 console.log(5555555,i);
 if(i==obj_arr.length-1){
 _call({msg:'suc',id:10007});
 return;
 bracket
 removefile();
 } else {
 if(612==err.code){
 _call({msg:'suc',id:10007});
 return;
 bracket
 console.log(err);
 bracket
 });
 bracket

////Delete Resources

removefile();
 bracket

Get token:

gettoken(_this,_call){
 var qiniu = require("qiniu");
 var str_space = _this.paramValue('space');
 qiniu.conf.ACCESS_KEY = '****************************************';
 qiniu.conf.SECRET_KEY = '****************************************';
 var bucket = str_space;
 console.log(11111,bucket,str_space);
 function uptoken(bucket) {
 var putPolicy = new qiniu.rs.PutPolicy(bucket);
 console.log(putPolicy,putPolicy.token());
 return putPolicy.token();
 bracket
 var token = uptoken(bucket);
 console.log(token);
 _call({id:'10006',msg:'suc',result:{uptoken:token}});
 bracket

3. Error reporting information:
图片描述

4. Try to solve:
I think it is inputtype=“file”I try to create the same input to replace the original box that can pop up the upload file, but it can’t be uploaded. I hope there will be a great god to give me some advice.

1. You called the delete interface. Have you confirmed whether it is really deleted? Go and see it in inside, Qiniu Space
2. Is it normal to upload other files?