If I upload images in two places on a page but I think their keys are different, how can I separate them without conflict? My current approach is to create two files
var uploader1= Qiniu.uploader({
'Key': function(up, file) {
var now = new Date();
var date = now.getFullYear()+((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1)+(now.getDate()<10?"0":"")+now.getDate();
return "topic/cover/"+date;
},
})
var uploader2= Qiniu.uploader({
'Key': function(up, file) {
var now = new Date();
var date = now.getFullYear()+((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1)+(now.getDate()<10?"0":"")+now.getDate();
return "topic/banner/"+date;
},
})
})
But why will the keys be the same if we do this?
What do you mean by different keys?
I know, it turns out that it needs to be instantiated