mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
[web-api] update upload file api
This commit is contained in:
@@ -822,11 +822,7 @@ class UploadLinkView(APIView):
|
||||
throttle_classes = (UserRateThrottle, )
|
||||
|
||||
def get(self, request, repo_id, format=None):
|
||||
parent_dir = request.GET.get('p', None)
|
||||
if parent_dir is None:
|
||||
return api_error(status.HTTP_400_BAD_REQUEST,
|
||||
'Missing argument.')
|
||||
|
||||
parent_dir = request.GET.get('p', '/')
|
||||
if check_folder_permission(repo_id, parent_dir, request.user.username) != 'rw':
|
||||
return api_error(status.HTTP_403_FORBIDDEN, 'Forbid to access this folder.')
|
||||
|
||||
|
Reference in New Issue
Block a user