mirror of
https://github.com/v0l/route96.git
synced 2025-06-20 07:10:30 +00:00
fix: nip96 upload
fix: leaky file handles
This commit is contained in:
@ -32,7 +32,7 @@ export class Nip96 {
|
||||
const fd = new FormData();
|
||||
fd.append("size", file.size.toString());
|
||||
fd.append("caption", file.name);
|
||||
fd.append("media_type", file.type);
|
||||
fd.append("content_type", file.type);
|
||||
fd.append("file", file);
|
||||
|
||||
const rsp = await this.#req("", "POST", fd);
|
||||
|
@ -23,8 +23,7 @@ export default function Upload() {
|
||||
const login = useLogin();
|
||||
const pub = usePublisher();
|
||||
|
||||
const url = `${location.protocol}//${location.host}`;
|
||||
//const url = "http://localhost:8000";
|
||||
const url = import.meta.env.VITE_API_URL || `${location.protocol}//${location.host}`;
|
||||
async function doUpload() {
|
||||
if (!pub) return;
|
||||
if (!toUpload) return;
|
||||
|
Reference in New Issue
Block a user