Skip to content

Commit 9afdcaa

Browse files
authored
Return static file's relative_path not http_url (#555)
So that the user doesn't have to manually remove `http://localhost:4000/` from the value returned by the image-picker modal
1 parent c4499cf commit 9afdcaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/FilePreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class FilePreview extends Component {
4545
);
4646

4747
const nodeLink = onClick ? (
48-
<a onClick={onClick.bind(null, file.http_url)}>{node}</a>
48+
<a onClick={() => onClick(file.relative_path)}>{node}</a>
4949
) : (
5050
<a href={file.http_url} target="_blank">
5151
{node}

0 commit comments

Comments
 (0)