diff --git a/frontend/src/shared-dir-view.js b/frontend/src/shared-dir-view.js index c3aca42854..8201ab2877 100644 --- a/frontend/src/shared-dir-view.js +++ b/frontend/src/shared-dir-view.js @@ -20,7 +20,7 @@ moment.locale(window.app.config.lang); let loginUser = window.app.pageOptions.name; const { - token, dirName, sharedBy, + token, dirName, dirPath, sharedBy, repoID, path, mode, thumbnailSize, zipped, trafficOverLimit, canDownload, @@ -309,7 +309,7 @@ class SharedDirView extends React.Component { ref={uploader => this.uploader = uploader} dragAndDrop={false} token={token} - path={path} + path={dirPath} repoID={repoID} onFileUploadSuccess={this.onFileUploadSuccess} /> diff --git a/seahub/templates/view_shared_dir_react.html b/seahub/templates/view_shared_dir_react.html index 1b9d7cc819..85cb6f7575 100644 --- a/seahub/templates/view_shared_dir_react.html +++ b/seahub/templates/view_shared_dir_react.html @@ -20,6 +20,7 @@ window.shared = { pageOptions: { dirName: '{{ dir_name|escapejs }}', + dirPath: '{{ dir_path|escapejs }}', sharedBy: '{{ username|email2nickname|escapejs }}', repoID: '{{repo.id}}', path: '{{ path|escapejs }}', diff --git a/seahub/views/repo.py b/seahub/views/repo.py index b1eb8bb9b2..ded1e6cac3 100644 --- a/seahub/views/repo.py +++ b/seahub/views/repo.py @@ -344,6 +344,7 @@ def view_shared_dir(request, fileshare): 'path': req_path, 'username': username, 'dir_name': dir_name, + 'dir_path': real_path, 'file_list': file_list, 'dir_list': dir_list, 'zipped': zipped,