From de7ac42f658dd064631b7e993926c4c5d4ed54cf Mon Sep 17 00:00:00 2001 From: hole-thu Date: Sun, 17 Apr 2022 22:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=EF=BC=9A=E6=8F=90=E4=BE=9B=E5=A4=9Aipfs=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/ipfs.html | 38 ++++++++++++++++++++++++++++++++++++++ src/UserAction.js | 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 public/ipfs.html 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); }