mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 10:26:17 +00:00
show repo name when upload file to root directory
This commit is contained in:
@@ -532,8 +532,16 @@ def view_shared_upload_link(request, token):
|
||||
|
||||
username = uploadlink.username
|
||||
repo_id = uploadlink.repo_id
|
||||
repo = get_repo(repo_id)
|
||||
if not repo:
|
||||
raise Http404
|
||||
|
||||
path = uploadlink.path
|
||||
dir_name = os.path.basename(path[:-1])
|
||||
if path == '/':
|
||||
# use repo name as dir name if share whole library
|
||||
dir_name = repo.name
|
||||
else:
|
||||
dir_name = os.path.basename(path[:-1])
|
||||
|
||||
repo = get_repo(repo_id)
|
||||
if not repo:
|
||||
|
Reference in New Issue
Block a user