fix upload url
This commit is contained in:
parent
385b4479ae
commit
bc16134f6d
@ -5,19 +5,17 @@ export default async function NostrBuildUpload(file: File | Blob): Promise<Uploa
|
||||
fd.append("fileToUpload", file);
|
||||
fd.append("submit", "Upload Image");
|
||||
|
||||
let rsp = await fetch("https://nostr.build/api/upload/", {
|
||||
let rsp = await fetch("https://nostr.build/api/upload/snort.php", {
|
||||
body: fd,
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "multipart/form-data",
|
||||
"accept": "application/json"
|
||||
}
|
||||
});
|
||||
if(rsp.ok) {
|
||||
let data = await rsp.json();
|
||||
console.debug(data);
|
||||
return {
|
||||
url: data.url
|
||||
url: new URL(data).toString()
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user