feat(activities): attach compressed photos to activity notes
Photos on an activity are shrunk with the form-builder compressor and stored only when they fit under 200KB. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -97,6 +97,7 @@ export async function prepareFormFieldFile(file: File): Promise<{
|
||||
mime: string;
|
||||
size: number;
|
||||
dataUrl: string;
|
||||
file: File;
|
||||
}> {
|
||||
let prepared = file;
|
||||
if (file.type.startsWith('image/')) {
|
||||
@@ -115,6 +116,7 @@ export async function prepareFormFieldFile(file: File): Promise<{
|
||||
mime: prepared.type || file.type || 'application/octet-stream',
|
||||
size: prepared.size,
|
||||
dataUrl,
|
||||
file: prepared,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user