-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
32 lines (27 loc) · 927 Bytes
/
index.html
File metadata and controls
32 lines (27 loc) · 927 Bytes
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
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/uc-file-uploader-minimal.min.css"
>
<script type="module">
import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/uc-file-uploader-minimal.min.js';
UC.defineComponents(UC);
const ctxProvider = document.querySelector("uc-upload-ctx-provider");
ctxProvider.addEventListener("common-upload-success", (e) => {
console.log(
"Uploaded files URL list",
e.detail.successEntries.map((entry) => entry.cdnUrl)
);
});
</script>
<uc-config
ctx-name="my-uploader"
use-cloud-image-editor="false"
source-list="local"
cdn-cname="https://3uf3618cjv.ucarecd.net/"
pubkey="b12dfd2019d2f336698a"
></uc-config>
<uc-file-uploader-minimal
ctx-name="my-uploader"
class="uc-light"
></uc-file-uploader-minimal>
<uc-upload-ctx-provider ctx-name="my-uploader"></uc-upload-ctx-provider>