mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: send auth token with preview generation request
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { Play, RefreshCw, Video, Volume2 } from "lucide-react";
|
import { Play, RefreshCw, Video, Volume2 } from "lucide-react";
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { useTranslation } from "@/contexts/i18n-context";
|
import { useTranslation } from "@/contexts/i18n-context";
|
||||||
|
import { formatHeaders } from "@/lib/api";
|
||||||
import { formatFileSize } from "@/lib/download";
|
import { formatFileSize } from "@/lib/download";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ export function NonNativePreview({ file, filename, fileSize, modality }: NonNati
|
|||||||
|
|
||||||
const response = await fetch("/api/v1/preview/generate", {
|
const response = await fetch("/api/v1/preview/generate", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
headers: formatHeaders(),
|
||||||
body: formData,
|
body: formData,
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user