MCPcopy Create free account
hub / github.com/ShipSecAI/studio / uploadFile

Method uploadFile

packages/backend-client/src/api-client.ts:368–378  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

366 }
367
368 async uploadFile(file: File) {
369 const formData = new FormData();
370 formData.append('file', file);
371
372 // Use the typed client - it will automatically apply middleware (including auth headers)
373 // For multipart/form-data, openapi-fetch accepts FormData directly
374 return this.client.POST('/api/v1/files/upload', {
375 body: formData as any, // Type assertion needed as generated types expect { file?: string } but FormData works at runtime
376 // openapi-fetch will automatically set Content-Type for FormData
377 });
378 }
379
380 async getFileMetadata(id: string) {
381 return this.client.GET('/api/v1/files/{id}', {

Callers

nothing calls this directly

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected