Mache große IMAP-Fächer, die Paperless-Suche und die interne Markdown-Notiz über die gemeinsamen Schnittstellen benutzbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c3a07cee64
commit
7e39fbb2bd
29 files changed
+6053
-320
No files matched your search
@@ -160,6 +160,17 @@ export async function downloadFile(elementId, context, filename) {
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
export async function fetchBlob(path) {
|
||||
const response = await fetch(path, { credentials: "include", headers: scopeHeaders() });
|
||||
if (!response.ok) {
|
||||
const data = await response.json().catch(() => null);
|
||||
const error = new Error(data?.detail || "Die Vorschau ist nicht verfügbar.");
|
||||
error.status = response.status;
|
||||
throw error;
|
||||
}
|
||||
return response.blob();
|
||||
}
|
||||
|
||||
export async function downloadPost(path, body, fallbackName) {
|
||||
const headers = { ...scopeHeaders(), "Content-Type": "application/json" };
|
||||
if (csrf) headers["X-CSRF-Token"] = csrf;
|
||||
|
||||
Reference in new issue
Block a user