uppy/examples/aws-nodejs/public/index.html
Prakash 5519b84409
@uppy: upgrade biome and more improvements (#6244)
- This PR upgrades `biome` from `2.0.5` -> `2.1.2` and adds two new
rules
-
[noUnusedImports](https://biomejs.dev/linter/rules/no-unused-private-class-members)
( we already had suppressions for this rule in code, but the rule itself
was never enabled in the config )
-
[noUnusedPrivateClassMembers](https://biomejs.dev/linter/rules/no-unused-private-class-members/)
- remove stale suppressions. 
- remove stale code.

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2026-05-21 12:28:03 +08:00

72 lines
2.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Uppy AWS upload example</title>
<link href="./uppy.min.css" rel="stylesheet" />
</head>
<body>
<h1>AWS upload example</h1>
<details open name="uppy">
<summary>Sign on the server</summary>
<div id="uppy-sign-on-server"></div>
</details>
<details name="uppy">
<summary>Sign on the client (if WebCrypto is available)</summary>
<div id="uppy-sign-on-client"></div>
</details>
<footer>
You seeing the simplified example, with a backend that mimicks a
Companion-like instance. See
<a href="./withCustomEndpoints.html">the custom endpoint example</a> if
you need to see how to use one or more custom function for handling
communication with the backend.
</footer>
<noscript>You need JavaScript to run this example.</noscript>
<script type="module">
import { AwsS3, Dashboard, Uppy } from './uppy.min.mjs'
function onUploadComplete(result) {
console.log(
'Upload complete! Weve uploaded these files:',
result.successful,
)
}
function onUploadSuccess(file, data) {
console.log(
'Upload success! Weve uploaded this file:',
file.meta.name,
)
}
{
const uppy = new Uppy()
.use(Dashboard, {
inline: true,
target: '#uppy-sign-on-server',
})
.use(AwsS3, {
id: 'myAWSPlugin',
endpoint: '/',
})
uppy.on('complete', onUploadComplete)
uppy.on('upload-success', onUploadSuccess)
}
{
const uppy = new Uppy()
.use(Dashboard, {
inline: true,
target: '#uppy-sign-on-client',
})
.use(AwsS3, {
id: 'myAWSPlugin',
endpoint: '/',
getTemporarySecurityCredentials: typeof crypto?.subtle === 'object',
})
uppy.on('complete', onUploadComplete)
uppy.on('upload-success', onUploadSuccess)
}
</script>
</body>
</html>