upload-support 경로 수정

main
이범준 4 months ago
parent 8cab958b07
commit 96766399f2

@ -22,7 +22,7 @@
<!-- base --> <!-- base -->
<script src="<c:url value="/webjars/js/base/base.js"/>"></script> <script src="<c:url value="/webjars/js/base/base.js"/>"></script>
<script src="<c:url value="/webjars/js/base/dataset.js"/>"></script> <script src="<c:url value="/webjars/js/base/dataset.js"/>"></script>
<script src="<c:url value="/resources/js/base/upload-support.js?${ver}"/>"></script> <script src="<c:url value="/webjars/js/base/upload-support.js?${ver}"/>"></script>
<script src="<c:url value="/webjars/js/base/code.js"/>"></script> <script src="<c:url value="/webjars/js/base/code.js"/>"></script>
<script src="<c:url value="/webjars/js/base/code-support.js"/>"></script> <script src="<c:url value="/webjars/js/base/code-support.js"/>"></script>
<script src="<c:url value="/webjars/js/base/menu.js"/>"></script> <script src="<c:url value="/webjars/js/base/menu.js"/>"></script>

@ -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…
Cancel
Save