fix: avoid broken link when preview image (#10021)

closes #9589
This commit is contained in:
Harshavardhana 2020-07-12 12:09:22 -07:00 committed by GitHub
parent 37c14207d6
commit 60d91234b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 42 deletions

View File

@ -46,11 +46,11 @@ class PreviewObjectModal extends React.Component {
<ModalBody>
<div className="input-group">
{this.state.url && (
<img
alt="Image broken"
src={this.state.url}
style={{ display: "block", width: "100%" }}
/>
<object data={this.state.url}>
<h3 style={{ textAlign: "center", display: "block", width: "100%" }}>
Do not have read permissions to preview "{this.props.object.name}"
</h3>
</object>
)}
</div>
</ModalBody>

File diff suppressed because one or more lines are too long