Open Brain documents from their title
Clicking a document's title fetches the original file from the engine: viewable formats open in a new tab, the rest (or a blocked tab) download under the original name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,7 @@ function asSource(d: EngineDocument): Source {
|
||||
export const listDocuments = async () => (await request<EngineDocument[]>('/upload/list')).map(asSource)
|
||||
export const documentStatus = (id: number) => request<EngineDocument>(`/upload/${id}`)
|
||||
export const deleteDocument = (id: number) => request<null>(`/upload/${id}`, { method: 'DELETE' })
|
||||
export const documentFile = (id: number) => request<Blob>(`/upload/${id}/file`, { as: 'blob' })
|
||||
|
||||
export async function supportedExtensions(): Promise<Set<string>> {
|
||||
const f = await request<{ extensions: string[] }>('/upload/supported-formats')
|
||||
|
||||
Reference in New Issue
Block a user