Fix capture form field name — audio not file
This commit is contained in:
@@ -60,7 +60,7 @@ export default function CapturePage() {
|
|||||||
try {
|
try {
|
||||||
const blob = new Blob(chunksRef.current, { type: mimeTypeRef.current });
|
const blob = new Blob(chunksRef.current, { type: mimeTypeRef.current });
|
||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append('file', blob, 'capture.webm');
|
form.append('audio', blob, 'capture.webm');
|
||||||
const res = await fetch(`${API_URL}/api/capture`, { method: 'POST', body: form });
|
const res = await fetch(`${API_URL}/api/capture`, { method: 'POST', body: form });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
setState('saved');
|
setState('saved');
|
||||||
|
|||||||
Reference in New Issue
Block a user