1
0
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:
lian
2015-03-07 18:17:00 +08:00
parent adbcc842dc
commit a859daffbd

View File

@@ -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.')