Skip to content

Commit

Permalink
sentienhq#2 add/test browser support [wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
good-lly committed Nov 11, 2024
1 parent b9503c8 commit 4383581
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 12 deletions.
28 changes: 20 additions & 8 deletions dev/TODO_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,31 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FemtoS3.js Dev Index File</title>
<title>ultralight-s3 - test browser</title>
<link rel="icon" href="data:image/x-icon;base64,iVBORw0KGgo=" />
</head>
<body>
<h1>Welcome dummy</h1>
<div id="app"></div>
<script type="module" src="./index.js" defer></script>
<script type="module" defer>
console.log('test2');
const configR2 = {};
const s3 = new S3(configR2);
const s3list = await s3.list();
console.log('s3list', s3list);
<!-- <script type="module" src="index.min.js"></script> -->
<script type="module">
import { S3 } from './index.min.js';
(async () => {
try {
const s3 = new S3({
endpoint: 'https://bb524cea561a09205de92fae35369ecb.r2.cloudflarestorage.com',
accessKeyId: 'd573cce38cb6e9d21e6349a3db49d15a',
secretAccessKey: '6053da249eeda22b5bb6950ecc63a539a3507afe5e08708c85fcaec5b431812e',
bucketName: 'bordel-testing',
region: 'auto',
logger: console,
});
const s3list = await s3.list();
console.log(s3list);
} catch (error) {
console.error('Error:', error);
}
})();
</script>
</body>
</html>
19 changes: 19 additions & 0 deletions dev/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4383581

Please sign in to comment.