Skip to content

Commit

Permalink
Return static file's relative_path not http_url (#555)
Browse files Browse the repository at this point in the history
So that the user doesn't have to manually remove `http://localhost:4000/`
from the value returned by the image-picker modal
  • Loading branch information
ashmaroli committed Dec 11, 2019
1 parent c4499cf commit 9afdcaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FilePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class FilePreview extends Component {
);

const nodeLink = onClick ? (
<a onClick={onClick.bind(null, file.http_url)}>{node}</a>
<a onClick={() => onClick(file.relative_path)}>{node}</a>
) : (
<a href={file.http_url} target="_blank">
{node}
Expand Down

0 comments on commit 9afdcaa

Please sign in to comment.