-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (44 loc) · 2.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="dist/styles.css">
<script src="dist/index.js"></script>
</head>
<body>
<button onclick="uploader.open()">open</button>
<script>
window.uploader = new EzUploader({
upload: {
target: `/api/v1/team/develop/datasets/images/fd1a60ec-67d5-4a87-94df-b3eb655c71d7/upload/resumable`,
headers: {
Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImE5ZDFhNDZiYzFjMTdkODBhMmMxMTU2MGU3NWUyOTVjOTg0MzEzYjE5NWRmMWU4Y2MyYmIwOGJmY2IzNDM0OTI1MGFlMGJlMmFhYjRiYzgzIn0.eyJhdWQiOiIyIiwianRpIjoiYTlkMWE0NmJjMWMxN2Q4MGEyYzExNTYwZTc1ZTI5NWM5ODQzMTNiMTk1ZGYxZThjYzJiYjA4YmZjYjM0MzQ5MjUwYWUwYmUyYWFiNGJjODMiLCJpYXQiOjE1NDAxOTMwMDksIm5iZiI6MTU0MDE5MzAwOSwiZXhwIjoxNTQxNDg5MDA5LCJzdWIiOiI3NjBiZTEwYy0xZjI3LTQxN2ItODdkNC1kM2NlMmMwNTFlNjAiLCJzY29wZXMiOlsiKiJdfQ.pXjEm_mx3hNplaUb3yhDWJ27F4ZpBBK_eZdU_T1Bv5iLeg83tmXnj1QwR8upVMojvXf3crbOHQE_yd8DHmfEzlIEbdjq08f9V4M8RanTX7_j5EwKdjNHLMPQdQfr_pXBFq7oXoSG9rtc9FUq6YdZHA6Rc2UN8Pzw4WYPmLpi3UcE3kblXTpcuD1V_54qljRPep0ZbfO2OJm_m7eFEi68w_6QKcDjE8LMRWkh1Y90FZ7oGs4Kye8OgDTN5afDUOYTVgz5gDTuvzA2nM0K8Vzbr9FhXXl949zvv3ErgOdyKWf82m6EDUaracPGbbl1wQoqQnnOzmJvFx4ttPgs8ujC0Z4ByM5T9EPwgiC5Phute1jdjoaY1uru6DK8AvHORxZUuNRnwxUA3gI7eOcQgqIEvKjB-kqCffPaklJrNFxIbOimqQXEXlIX0Pq2Z163ncCqq88yYGBTjWzuU2ToqSqaSwmLPIo6UmaxXHIugqt7VPPenR1G0o24KUoz__C-lGTMJywN5Ejd9o9gCwsGfhqnPnQsJGIHHo9-Nj_uwnTqQ9k81oJWz1TzFMVHG29vO_MVrEeiy98yM5s-JZ0G30FLpmMZP7dbUMZ3I0-T94oXcvmeBFFFPecnKjunbNSX07bIxKgL6kJvFHq8IXhnPZgsUbu6QGyEMopPlZUWvcxh8gw'
},
fileTypes: ['jpg', 'jpeg', 'png'],
//fileType: ['jpg']
},
throttle: {
debug: true
},
ui: {
doneText: 'finish uploading'
}
});
uploader.open();
/*
var maxImages = 20000;
uploader.uploader.on('filesAdded', (files) => {
var allowedSelectedFiles = maxImages - ( uploader.files.length - files.length );
if (files.length > allowedSelectedFiles) {
uploader.uploader.files.splice(maxImages, uploader.files.length);
uploader.error = `You can only upload ${maxImages} ${maxImages > 1 ? 'images' : 'image'}`;
uploader.updateDOM();
}
});
*/
</script>
</body>
</html>