Link gallery uploads back to chat

This commit is contained in:
pewdiepie-archdaemon
2026-06-29 02:34:11 +00:00
parent e2c8b8eb37
commit 4a7c03d536
4 changed files with 72 additions and 11 deletions
+2 -1
View File
@@ -142,7 +142,7 @@ export function removePending(idx) {
/**
* Upload all pending files to server
*/
export async function uploadPending() {
export async function uploadPending(opts = {}) {
if (pendingFiles.length === 0) return [];
_lastUploadCancelled = false;
@@ -169,6 +169,7 @@ export async function uploadPending() {
const fd = new FormData();
pendingFiles.forEach(f => fd.append('files', f, f.name || 'paste.png'));
if (opts.sessionId) fd.append('session_id', opts.sessionId);
_uploadAbortCtrl = new AbortController();
_uploading = true;
const timeoutId = setTimeout(() => {