From a859daffbd60cc90eb76c9886f819c8973804ae5 Mon Sep 17 00:00:00 2001 From: lian Date: Sat, 7 Mar 2015 18:17:00 +0800 Subject: [PATCH] [web-api] update upload file api --- seahub/api2/views.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/seahub/api2/views.py b/seahub/api2/views.py index 5f4e4ba113..24b88cfde0 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -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.')