OpenListTeam / OpenListTeam/OpenList-Docs
[BUG] 在使用OpenList API upload file(stream)进行上传时,path失效,并直接将根目录替换为上传的文件
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 63
- Forks
- 130
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Description
Please confirm the following
-
I have read and agree to AGPL-3.0 Section 15 .
The program is provided "as is" without any warranties; you bear all risks of using it. -
I have read and agree to AGPL-3.0 Section 16 .
The copyright holders and distributors are not liable for any damages resulting from the use or inability to use the program. -
I confirm my description is clear, polite, helps developers quickly locate the issue, and complies with community rules.
-
I have read the OpenList documentation.
-
I confirm there are no duplicate issues or discussions.
-
I confirm this is an
OpenListissue, not caused by other reasons (such as network, dependencies, or operation). -
I believe this issue must be handled by
OpenListand not by a third party. -
I confirm this issue is not fixed in the latest version.
OpenList Version (required)
4.1.4
Storage Driver Used (required)
Aliyun
Bug Description (required)
在使用OpenList API upload file(stream)进行上传时,path失效,并直接将根用户目录替换为上传的文件。
具体python代码:
def _conn_upload_file(self, path: str, payload: bytes, modified: str):
print(path, modified)
wait_for_confirmation()
self.conn.request("PUT", "/api/fs/put", payload, {
'path': path,
'As-Task': 'true',
'Last-Modified': modified,
'Authorization': self._jwt(),
'Content-Type': 'application/octet-stream'
})
res = self.conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
参数取值和response看下方log打印
Logs (required)
Configuration File Content (required)
Reproduction Link (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the upload request shown in the Python _conn_upload_file example, using PUT /api/fs/put with an Aliyun storage driver and a nested path. Then trace the API upload handling and verify that the requested path is preserved without replacing the root user directory; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100