Browse Source

BUGFIX | open and preview files (.ppt & .xlsx) (#33)

APP. Перегляд документа Microsoft PowerPoint в середені додатку
APP. Перегляд документа EXCEL всередені додатку

Reviewed-on: #33
Co-authored-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
Co-committed-by: Yevhen Romanenko <yevhen.romanenko.jetup@gmail.com>
pull/34/head
Yevhen Romanenko 8 months ago committed by Vitalik Yatsenko
parent
commit
6ef1a62aaf
  1. 1
      src/services/system/fs.service.ts
  2. 2
      src/shared/components/modals/preview-file-modal.smart-component.tsx
  3. 1
      src/shared/enums/file-type.enum.ts

1
src/services/system/fs.service.ts

@ -341,6 +341,7 @@ const validFileType = [ @@ -341,6 +341,7 @@ const validFileType = [
FileType.XLS,
FileType.XLSX,
FileType.PPTX,
FileType.PPT,
]
const previewFile = (url: string) => {

2
src/shared/components/modals/preview-file-modal.smart-component.tsx

@ -39,7 +39,7 @@ export const PreviewFileModal = () => { @@ -39,7 +39,7 @@ export const PreviewFileModal = () => {
default:
return (
<WebviewPlugin
url={`https://view.officeapps.live.com/op/embed.aspx?src=${params?.fileUrl}`}
url={`https://docs.google.com/gview?embedded=true&url=${params?.fileUrl}`}
/>
)
}

1
src/shared/enums/file-type.enum.ts

@ -14,4 +14,5 @@ export enum FileType { @@ -14,4 +14,5 @@ export enum FileType {
DOCX = 'docx',
XLSX = 'xlsx',
PPTX = 'pptx',
PPT = 'ppt',
}

Loading…
Cancel
Save