mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 01:39:36 +08:00
🎨 提供读写文件 API https://github.com/siyuan-note/siyuan/issues/4343
This commit is contained in:
parent
539c4d9781
commit
02f9915fb0
39
API_zh_CN.md
39
API_zh_CN.md
@ -36,6 +36,9 @@
|
|||||||
* [渲染模板](#渲染模板)
|
* [渲染模板](#渲染模板)
|
||||||
* [导出](#导出)
|
* [导出](#导出)
|
||||||
* [导出 Markdown 文本](#导出-markdown-文本)
|
* [导出 Markdown 文本](#导出-markdown-文本)
|
||||||
|
* [文件](#文件)
|
||||||
|
* [获取文件](#获取文件)
|
||||||
|
* [写入文件](#写入文件)
|
||||||
* [系统](#系统)
|
* [系统](#系统)
|
||||||
* [获取启动进度](#获取启动进度)
|
* [获取启动进度](#获取启动进度)
|
||||||
* [获取系统版本](#获取系统版本)
|
* [获取系统版本](#获取系统版本)
|
||||||
@ -773,6 +776,42 @@
|
|||||||
|
|
||||||
/template/render
|
/template/render
|
||||||
|
|
||||||
|
## 文件
|
||||||
|
|
||||||
|
### 获取文件
|
||||||
|
|
||||||
|
* `/api/file/getFile`
|
||||||
|
* 参数
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p.sy"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
* `path`:工作空间路径下的文件路径
|
||||||
|
* 返回值
|
||||||
|
|
||||||
|
文件内容
|
||||||
|
|
||||||
|
### 写入文件
|
||||||
|
|
||||||
|
* `/api/file/putFile`
|
||||||
|
* 参数为 HTTP Multipart 表单
|
||||||
|
|
||||||
|
* `path`:工作空间路径下的文件路径
|
||||||
|
* `isDir`:是否为创建文件夹,为 `true` 时仅创建文件夹,忽略 `file`
|
||||||
|
* `modTime`:最近访问时间,Unix time
|
||||||
|
* `file`:上传的文件
|
||||||
|
* 返回值
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 0,
|
||||||
|
"msg": "",
|
||||||
|
"data": null
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 导出
|
## 导出
|
||||||
|
|
||||||
### 导出 Markdown 文本
|
### 导出 Markdown 文本
|
||||||
|
Loading…
Reference in New Issue
Block a user