优化文件上传:提供多ipfs网关查询

This commit is contained in:
2022-04-17 22:33:34 +08:00
parent f7fc9a98e4
commit de7ac42f65
2 changed files with 40 additions and 1 deletions

View File

@@ -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);
}