mirror of
https://github.com/docmost/docmost.git
synced 2026-08-29 18:14:58 +08:00
fix: don't auto embed pdf
This commit is contained in:
+1
-1
Submodule apps/server/src/ee updated: 5e9a9b4bcb...ae2f7eb411
@@ -452,16 +452,7 @@ export class ImportAttachmentService {
|
|||||||
|
|
||||||
const audioExtensions = new Set(['.mp3', '.wav', '.ogg', '.m4a', '.webm', '.flac', '.aac']);
|
const audioExtensions = new Set(['.mp3', '.wav', '.ogg', '.m4a', '.webm', '.flac', '.aac']);
|
||||||
|
|
||||||
if (ext === '.pdf') {
|
if (ext === '.mp4') {
|
||||||
const $pdf = $('<div>')
|
|
||||||
.attr('data-type', 'pdf')
|
|
||||||
.attr('src', apiFilePath)
|
|
||||||
.attr('data-attachment-id', attachmentId)
|
|
||||||
.attr('width', '800')
|
|
||||||
.attr('height', '600');
|
|
||||||
$a.replaceWith($pdf);
|
|
||||||
unwrapFromParagraph($, $pdf);
|
|
||||||
} else if (ext === '.mp4') {
|
|
||||||
const $video = $('<video>')
|
const $video = $('<video>')
|
||||||
.attr('src', apiFilePath)
|
.attr('src', apiFilePath)
|
||||||
.attr('data-attachment-id', attachmentId)
|
.attr('data-attachment-id', attachmentId)
|
||||||
|
|||||||
Reference in New Issue
Block a user