stage3: add image uploads

This commit is contained in:
James Xylight committed 2025-09-04 18:45:36 -07:00
1 parent f177fab454
commit a9fff5c9e8
11 files changed
+124 -57

No files matched your search

+12 -1
View File
@@ -1,6 +1,14 @@
import type { ClientType } from './lemmy.svelte'
import * as types from './types'
export type ClientType =
| { name: 'lemmy'; baseUrl: '/api/v3' }
| { name: 'piefed'; baseUrl: '/api/alpha' }
export const DEFAULT_CLIENT_TYPE: ClientType = {
name: 'lemmy',
baseUrl: '/api/v3',
}
export abstract class BaseClient {
abstract type: ClientType
@@ -203,4 +211,7 @@ export abstract class BaseClient {
abstract blockInstance(
form: types.BlockInstance,
): Promise<types.BlockInstanceResponse>
abstract uploadImage(
form: types.UploadImage,
): Promise<types.UploadImageResponse>
}