Browse Source

FIX | Encode file url to make it possible preview files that including any symbols in url (#37)

BANK-1179: Мобільний застосунок. В чаті "Тест документів" не відкриваються деякі документи
Reviewed-on: #37
Co-authored-by: Oksana Stepanenko <oksana.stepanenko@jetup.team>
Co-committed-by: Oksana Stepanenko <oksana.stepanenko@jetup.team>
pull/38/head
Oksana Stepanenko 8 months ago committed by Vitalik Yatsenko
parent
commit
767449178b
  1. 4
      src/shared/components/modals/preview-file-modal.smart-component.tsx

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

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

Loading…
Cancel
Save