File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -620,7 +620,7 @@ const ImagePreview = memo(function ImagePreview({ file }: { file: WorkspaceFileR
620620} )
621621
622622function resolvePreviewError ( fetchError : Error | null , renderError : string | null ) : string | null {
623- if ( fetchError ) return fetchError instanceof Error ? fetchError . message : 'Failed to load file'
623+ if ( fetchError ) return fetchError . message
624624 return renderError
625625}
626626
@@ -955,7 +955,7 @@ const DocxPreview = memo(function DocxPreview({
955955 < div className = 'flex flex-1 overflow-hidden' >
956956 < iframe
957957 srcDoc = { buildDocxPreviewHtml ( html ) }
958- sandbox = 'allow-same-origin '
958+ sandbox = ''
959959 title = { file . name }
960960 className = 'h-full w-full border-0'
961961 />
@@ -1013,7 +1013,7 @@ const XlsxPreview = memo(function XlsxPreview({
10131013 try {
10141014 setRenderError ( null )
10151015 const XLSX = await import ( 'xlsx' )
1016- const workbook = XLSX . read ( data , { type : 'array' } )
1016+ const workbook = XLSX . read ( new Uint8Array ( data ) , { type : 'array' } )
10171017 if ( ! cancelled ) {
10181018 workbookRef . current = workbook
10191019 setSheetNames ( workbook . SheetNames )
You can’t perform that action at this time.
0 commit comments