v0.9.7
parent
1fe3508ec6
commit
ccb61b00fa
|
|
@ -474,6 +474,7 @@ async def get_project_share_file(
|
||||||
ensure_share_access(share, request, password)
|
ensure_share_access(share, request, password)
|
||||||
file_path = storage_service.get_secure_path(project.storage_key, path)
|
file_path = storage_service.get_secure_path(project.storage_key, path)
|
||||||
content = await storage_service.read_file(file_path)
|
content = await storage_service.read_file(file_path)
|
||||||
|
content = rewrite_markdown_assets(content, f"/api/v1/shares/project/{share.share_code}/assets")
|
||||||
return success_response(data={"content": content})
|
return success_response(data={"content": content})
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -573,7 +574,7 @@ async def get_file_share_content(
|
||||||
})
|
})
|
||||||
|
|
||||||
content = await storage_service.read_file(file_path)
|
content = await storage_service.read_file(file_path)
|
||||||
content = rewrite_markdown_assets_for_pdf(content)
|
content = rewrite_markdown_assets(content, f"/api/v1/shares/files/{share.share_code}/assets")
|
||||||
return success_response(data={
|
return success_response(data={
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"filename": Path(share.file_path).name,
|
"filename": Path(share.file_path).name,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue