diff --git a/public/ipfs.html b/public/ipfs.html new file mode 100644 index 0000000..1515dfa --- /dev/null +++ b/public/ipfs.html @@ -0,0 +1,38 @@ + + + + + + ipfs资源获取 + + + + + diff --git a/src/UserAction.js b/src/UserAction.js index 7cf2a72..a11f50b 100644 --- a/src/UserAction.js +++ b/src/UserAction.js @@ -691,7 +691,8 @@ export class PostForm extends Component { let new_text = this.state.text + '\n' + - (file_type.startsWith('image/') ? `![](${url})` : url); + (file_type.startsWith('image/') ? `![](${url})` : url) + + ` [加载失败请点击此](${window.location.origin}/ipfs.html#${data.hash})\n\n---\n`; this.setState({ text: new_text }); this.area_ref.current.set(new_text); }