Skip to content

Commit 9ae4738

Browse files
committed
feat: 增加文件上传成功后的相对路径的返回
1 parent 74b52b6 commit 9ae4738

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/extensions/file/local_uploader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def upload(self):
2020
ret.append({
2121
"key": single.name,
2222
"id": exists.id,
23-
"url": site_domain + '/assets/' + exists.path
23+
"url": site_domain + '/assets/' + exists.path,
24+
"path": exists.path
2425
})
2526
else:
2627
absolute_path, relative_path, real_name = self._get_store_path(single.filename)
@@ -37,6 +38,7 @@ def upload(self):
3738
ret.append({
3839
"key": single.name,
3940
"id": file.id,
40-
"url": site_domain + '/assets/' + file.path
41+
"url": site_domain + '/assets/' + file.path,
42+
"path": file.path
4143
})
4244
return ret

0 commit comments

Comments
 (0)