Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

feat(client): support yaml file content preview (#1034)

Corentin Thomassetc5ccac53c289
diff --git a/.changeset/happy-donkeys-prove.md b/.changeset/happy-donkeys-prove.md
new file mode 100644
index 00000000..eed360fa
--- /dev/null
+++ b/.changeset/happy-donkeys-prove.md
@@ -0,0 +1,5 @@
+---
+"@papra/app": patch
+---
+
+Added content preview for yaml files
diff --git a/apps/papra-client/src/modules/documents/components/document-preview.component.tsx b/apps/papra-client/src/modules/documents/components/document-preview.component.tsx
index 4add186f..faa47c3b 100644
--- a/apps/papra-client/src/modules/documents/components/document-preview.component.tsx
+++ b/apps/papra-client/src/modules/documents/components/document-preview.component.tsx
@@ -10,7 +10,7 @@ const PdfViewer = lazy(() => import('./pdf-viewer/simple-pdf-viewer.component').
const imageMimeType = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'];
const pdfMimeType = ['application/pdf'];
-const txtLikeMimeType = ['application/x-yaml', 'application/json', 'application/xml'];
+const txtLikeMimeType = ['application/yaml', 'application/json', 'application/xml'];
function blobToString(blob: Blob): Promise<string> {
return new Promise((resolve, reject) => {