Support importing markdown zip on the browser #14950
Merged
+122
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
特性或者缺陷?
思源笔记的 Docker Web 端不支持 Markdown 的导入,要导入一个/多个Markdown文档,需要:
sy.zip
(或者使用s3同步)sy.zip
通过web端的界面上传(或者在web端执行更新,拉取s3的结果)现有的有关讨论:
这样:
实现逻辑
通过实现API:
/api/import/importZipMd
,用户可以上传自己的 zip 文件,上传到server解压到临时文件夹,然后调用model.ImportFromLocalPath(notebook, unzipPath, toPath)
来进行。实现效果如下:
redpandacompress_2025-05-31.01-35-16.mp4
补充建议
似乎没有找到icon的ZIP,不太确定这些都是在哪里定义的,如果可以稍微改改会好些。
Dev branch!
Any changes should be submitted to the dev branch.
任何改动,请提交到 dev 分支。