Skip to content

Commit 9ccc47b

Browse files
committed
feat: preview text blob
1 parent 9a44b3d commit 9ccc47b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

components/modals/BlobModal.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ watch(
8585
await getBlobMetadata()
8686
8787
/** auto preview for small images */
88-
if (["image/png", "image/jpeg"].includes(blob.value.content_type) && cacheStore.selectedBlob.size < 100_000) {
88+
if (
89+
(["image/png", "image/jpeg"].includes(blob.value.content_type) || blob.value.content_type.startsWith("text/plain")) &&
90+
cacheStore.selectedBlob.size < 100_000
91+
) {
8992
handlePreviewContent()
9093
}
9194
} else {

0 commit comments

Comments
 (0)