upload-support 경로 수정
parent
8cab958b07
commit
96766399f2
@ -1,23 +0,0 @@
|
||||
function uploadSupport(selector) {
|
||||
let input = $(selector);
|
||||
if (!input)
|
||||
throw "Element not found: " + selector;
|
||||
|
||||
let fileset = new Dataset({
|
||||
keymapper: info => info.id
|
||||
});
|
||||
|
||||
input.change(function() {
|
||||
var files = $(this).get(0).files,
|
||||
length = files.length,
|
||||
array = []
|
||||
for (var i = 0; i < length; ++i) {
|
||||
var file = files[i];
|
||||
file.id = "file-" + new Date().getTime() + "-" + i;
|
||||
file.url = (window.URL || window.webkitURL).createObjectURL(file);
|
||||
array.push(file);
|
||||
}
|
||||
fileset.setData(array);
|
||||
});
|
||||
return fileset;
|
||||
}
|
Loading…
Reference in New Issue