mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-13 03:50:02 -04:00
Run a format
This commit is contained in:
parent
8d726133bc
commit
8f1feb8cff
36 changed files with 565 additions and 592 deletions
|
@ -1,7 +1,7 @@
|
|||
// This is a test file to upload files to the Nebula server
|
||||
import { FormData, File } from "formdata-node";
|
||||
import { fileFromPath } from "formdata-node/file-from-path";
|
||||
import fs from "fs";
|
||||
// This is a test file to upload files to the Nebula server
|
||||
import { File, FormData } from "formdata-node";
|
||||
import { fileFromPath } from "formdata-node/file-from-path";
|
||||
|
||||
const config = JSON.parse(fs.readFileSync("config.json", "utf8"));
|
||||
const form = new FormData();
|
||||
|
@ -13,8 +13,8 @@ console.log(config.marketplace_psk);
|
|||
console.log(form);
|
||||
await fetch("http://localhost:8080/api/upload-image", {
|
||||
headers: {
|
||||
PSK: config.marketplace_psk,
|
||||
PSK: config.marketplace_psk
|
||||
},
|
||||
method: "post",
|
||||
body: form,
|
||||
body: form
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue