fix: replace file.bytes() with file.arrayBuffer()
This commit is contained in:
parent
612d519068
commit
2500a00e21
2 changed files with 4 additions and 4 deletions
6
.github/workflows/ntfy.yaml
vendored
6
.github/workflows/ntfy.yaml
vendored
|
|
@ -3,11 +3,11 @@ on: [deployment_status]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
notify:
|
notify:
|
||||||
if: github.event.deployment_status.state == "failure" | github.event.deployment_status.state == "success"
|
if: github.event.deployment_status.state == 'failure' | github.event.deployment_status.state == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Notify on Success
|
- name: Notify on Success
|
||||||
if: github.event.deployment_status.state == "success"
|
if: github.event.deployment_status.state == 'success'
|
||||||
run: |
|
run: |
|
||||||
curl \
|
curl \
|
||||||
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
||||||
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
${{ secrets.NTFY_URL }}
|
${{ secrets.NTFY_URL }}
|
||||||
|
|
||||||
- name: Notify on Failure
|
- name: Notify on Failure
|
||||||
if: github.event.deployment_status.state == "failure"
|
if: github.event.deployment_status.state == 'failure'
|
||||||
run: |
|
run: |
|
||||||
curl \
|
curl \
|
||||||
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ function OpenSchematic({ close }: DialogProps) {
|
||||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||||
|
|
||||||
const fileExtension = file.name.split(".").pop();
|
const fileExtension = file.name.split(".").pop();
|
||||||
const bytes = await file.bytes();
|
const bytes = await file.arrayBuffer();
|
||||||
const data = await nbt.read(bytes);
|
const data = await nbt.read(bytes);
|
||||||
|
|
||||||
if (fileExtension == "litematic") {
|
if (fileExtension == "litematic") {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue