fix: nip96 upload
fix: leaky file handles
This commit is contained in:
parent
c8308f0003
commit
5bebb71f4d
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -1077,7 +1077,7 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
|
||||
[[package]]
|
||||
name = "ffmpeg-rs-raw"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.v0l.io/Kieran/ffmpeg-rs-raw.git?rev=4c3e1dfccc46d5487110dd9de5ba672c4d32697f#4c3e1dfccc46d5487110dd9de5ba672c4d32697f"
|
||||
source = "git+https://git.v0l.io/Kieran/ffmpeg-rs-raw.git?rev=df69b2f05da4279e36ad55086d77b45b2caf5174#df69b2f05da4279e36ad55086d77b45b2caf5174"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ffmpeg-sys-the-third",
|
||||
@ -1089,7 +1089,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ffmpeg-sys-the-third"
|
||||
version = "2.1.0+ffmpeg-7.1"
|
||||
source = "git+https://git.v0l.io/ffmpeg/ffmpeg-the-third.git?branch=master#0fdfa9ab506f5c92aad5a175db081c8a2c1579a1"
|
||||
source = "git+https://git.v0l.io/Kieran/ffmpeg-the-third.git?rev=e5f8e077b04b10d5887bce4df1eb1a71738a6c66#e5f8e077b04b10d5887bce4df1eb1a71738a6c66"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
|
@ -46,7 +46,7 @@ reqwest = "0.12.8"
|
||||
clap = { version = "4.5.18", features = ["derive"] }
|
||||
|
||||
libc = { version = "0.2.153", optional = true }
|
||||
ffmpeg-rs-raw = { git = "https://git.v0l.io/Kieran/ffmpeg-rs-raw.git", rev = "4c3e1dfccc46d5487110dd9de5ba672c4d32697f", optional = true }
|
||||
ffmpeg-rs-raw = { git = "https://git.v0l.io/Kieran/ffmpeg-rs-raw.git", rev = "df69b2f05da4279e36ad55086d77b45b2caf5174", optional = true }
|
||||
candle-core = { git = "https://git.v0l.io/huggingface/candle.git", tag = "0.7.2", optional = true }
|
||||
candle-nn = { git = "https://git.v0l.io/huggingface/candle.git", tag = "0.7.2", optional = true }
|
||||
candle-transformers = { git = "https://git.v0l.io/huggingface/candle.git", tag = "0.7.2", optional = true }
|
||||
|
1
ui_src/.env.development
Normal file
1
ui_src/.env.development
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_URL="http://localhost:8000"
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user