mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-15 07:52:14 +00:00
generate real image path when get thumbnail from share link
This commit is contained in:
parent
d9f73f8610
commit
a116cfaf99
@ -177,7 +177,12 @@ def share_link_latest_entry(request, token, size, path):
|
|||||||
if not repo:
|
if not repo:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
obj_id = get_file_id_by_path(repo_id, path)
|
if fileshare.path == '/':
|
||||||
|
image_path = path
|
||||||
|
else:
|
||||||
|
image_path = posixpath.join(fileshare.path, path.lstrip('/'))
|
||||||
|
|
||||||
|
obj_id = get_file_id_by_path(repo_id, image_path)
|
||||||
if obj_id:
|
if obj_id:
|
||||||
try:
|
try:
|
||||||
thumbnail_file = os.path.join(THUMBNAIL_ROOT, str(size), obj_id)
|
thumbnail_file = os.path.join(THUMBNAIL_ROOT, str(size), obj_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user