1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-23 12:27:48 +00:00

Merge pull request #312 from haiwen/4.0-web-api-fix

[web-api] Return dst-repo-id when move a file
This commit is contained in:
Daniel Pan
2014-12-12 17:47:12 +08:00

View File

@@ -1367,7 +1367,7 @@ class FileView(APIView):
return reloaddir(request, dst_repo, dst_dir)
else:
resp = Response('success', status=status.HTTP_301_MOVED_PERMANENTLY)
uri = reverse('FileView', args=[repo_id], request=request)
uri = reverse('FileView', args=[dst_repo_id], request=request)
resp['Location'] = uri + '?p=' + quote(dst_dir_utf8) + quote(new_filename_utf8)
return resp
elif operation.lower() == 'create':