mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
chore: add copilot vision dev mode polyfill (#6671)
This commit is contained in:
@@ -31,6 +31,10 @@ export class CopilotStorage {
|
||||
) {
|
||||
const name = `${userId}/${workspaceId}/${key}`;
|
||||
await this.provider.put(name, blob);
|
||||
if (this.config.node.dev) {
|
||||
// return image base64url for dev environment
|
||||
return `data:image/png;base64,${blob.toString('base64')}`;
|
||||
}
|
||||
return `${this.config.baseUrl}/api/copilot/blob/${name}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user