mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
Merge pull request #1647 from haiwen/fix-location-header-after-creating-directory
Fixed the location header after creating directory.
This commit is contained in:
@@ -2684,8 +2684,8 @@ class DirView(APIView):
|
|||||||
else:
|
else:
|
||||||
resp = Response('success', status=status.HTTP_201_CREATED)
|
resp = Response('success', status=status.HTTP_201_CREATED)
|
||||||
uri = reverse('DirView', args=[repo_id], request=request)
|
uri = reverse('DirView', args=[repo_id], request=request)
|
||||||
resp['Location'] = uri + '?p=' + quote(parent_dir.encode('utf-8')) + \
|
resp['Location'] = uri + '?p=' + quote(
|
||||||
quote(new_dir_name.encode('utf-8'))
|
parent_dir.encode('utf-8') + '/' + new_dir_name.encode('utf-8'))
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
elif operation.lower() == 'rename':
|
elif operation.lower() == 'rename':
|
||||||
|
Reference in New Issue
Block a user