Skip to content

Commit

Permalink
Merge pull request #1485 from 6gal6ler6/svillaltav3
Browse files Browse the repository at this point in the history
`ListItemAttachments` : FIX: Cannot download items when it has a ilegal character
  • Loading branch information
joaojmendes authored Mar 5, 2023
2 parents 391c821 + 01dc884 commit 564f4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controls/listItemAttachments/ListItemAttachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
directionalHint={DirectionalHint.rightCenter}>

<DocumentCard
onClickHref={!openAttachmentsInNewWindow && `${file.ServerRelativeUrl}?web=1`}
onClick={openAttachmentsInNewWindow && (() => window.open(`${file.ServerRelativeUrl}?web=1`, "_blank"))} // JJ - 20200613 - needed to support Microsoft Teams
onClickHref={!openAttachmentsInNewWindow && `${encodeURIComponent(file.ServerRelativeUrl)}?web=1`}
onClick={openAttachmentsInNewWindow && (() => window.open(`${encodeURIComponent(file.ServerRelativeUrl)}?web=1`, "_blank"))} // JJ - 20200613 - needed to support Microsoft Teams
className={styles.documentCard}>
<DocumentCardPreview previewImages={[previewImage]} />
<Label className={styles.fileLabel}>{fileName}</Label>
Expand Down

0 comments on commit 564f4ed

Please sign in to comment.