This commit is contained in:
TomDo1234 2024-04-03 17:47:53 +11:00
parent 7f64cfa3c4
commit 46523eb75a

View File

@ -278,11 +278,11 @@ const XLSX = require("xlsx");
var accessKeyId = "accessKeyId";
var secretAccessKey = "secretAccessKey";
var Bucket = "Bucket";
var region = "REGION";
var endpoint = "ENDPOINT";
// highlight-end
var region = "REGION";
var Key = "sheetjstest.xlsx";
var endpoint = "ENDPOINT";
/* Create a simple workbook and write XLSX to buffer */
var ws = XLSX.utils.aoa_to_sheet(["SheetJS".split(""), [5,4,3,3,7,9,5]]);
@ -354,11 +354,11 @@ const XLSX = require("xlsx");
var accessKeyId = "accessKeyId";
var secretAccessKey = "secretAccessKey";
var Bucket = "Bucket";
var region = "REGION";
var endpoint = "ENDPOINT";
// highlight-end
var region = "REGION";
var Key = "sheetjstest.xlsx";
var endpoint = "ENDPOINT";
/* upload to R2 */
var s3 = new S3Client({
@ -383,7 +383,7 @@ s3.send(command).then(async (data) => {
});
```
11) Edit `SheetJSReadFromR2.js` and replace the highlighted lines:
1) Edit `SheetJSReadFromR2.js` and replace the highlighted lines:
- `accessKeyId`: access key for the AWS account
- `secretAccessKey`: secret access key for the AWS account