feat: image/file sharing in chat with drive grouping by contact
Build & Release / Docker / backend (push) Successful in 2m10s
Build & Release / Docker / frontend (push) Successful in 2m30s
Build & Release / Desktop / Linux & Windows (push) Successful in 18m15s
Build & Release / Deploy to server (push) Successful in 34s
Build & Release / Create release (push) Has been skipped
Build & Release / Docker / backend (push) Successful in 2m10s
Build & Release / Docker / frontend (push) Successful in 2m30s
Build & Release / Desktop / Linux & Windows (push) Successful in 18m15s
Build & Release / Deploy to server (push) Successful in 34s
Build & Release / Create release (push) Has been skipped
- Attach button in chat sends encrypted files via conversation key - Images render inline; other files show a download button - Shared files stored on server with conversation_id for access control - Drive groups files by conversation partner name (sender view) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
515bef4fc9
commit
15160b9e86
3 files changed
+273
-91
No files matched your search
@@ -57,8 +57,15 @@ router.post('/upload', upload.single('file'), async (req: AuthRequest, res) => {
|
||||
|
||||
router.get('/files', async (req: AuthRequest, res) => {
|
||||
const result = await db.query(
|
||||
`SELECT id, encrypted_name, mime_type, size_bytes, encrypted_file_key, uploaded_at
|
||||
FROM files WHERE owner_id = $1 AND deleted_at IS NULL ORDER BY uploaded_at DESC`,
|
||||
`SELECT f.id, f.encrypted_name, f.mime_type, f.size_bytes, f.encrypted_file_key,
|
||||
f.uploaded_at, f.conversation_id,
|
||||
u.username AS shared_with_username
|
||||
FROM files f
|
||||
LEFT JOIN conversation_members cm
|
||||
ON cm.conversation_id = f.conversation_id AND cm.user_id != $1
|
||||
LEFT JOIN users u ON u.id = cm.user_id
|
||||
WHERE f.owner_id = $1 AND f.deleted_at IS NULL
|
||||
ORDER BY f.uploaded_at DESC`,
|
||||
[req.userId]
|
||||
);
|
||||
res.json(result.rows);
|
||||
|
||||
Reference in new issue
Block a user