This commit is contained in:
Timothy Jaeryang Baek
2026-05-20 01:30:26 +04:00
parent 60c9db1cb8
commit 73bdf86766
3 changed files with 148 additions and 103 deletions
+3 -2
View File
@@ -5,7 +5,8 @@ export const uploadFile = async (
token: string,
file: File,
metadata?: object | null,
process?: boolean | null
process?: boolean | null,
stream: boolean = true
) => {
const data = new FormData();
data.append('file', file);
@@ -42,7 +43,7 @@ export const uploadFile = async (
throw error;
}
if (res) {
if (res && stream) {
const status = await getFileProcessStatus(token, res.id);
if (status && status.ok) {