diff --git a/interface/views.py b/interface/views.py index da6b23c..b4e8f22 100644 --- a/interface/views.py +++ b/interface/views.py @@ -98,7 +98,9 @@ class S3CompleteView(SingleObjectMixin, RedirectView): self.complete(request.GET['key']) elif 'location' in request.GET: uri = urlparse(request.GET['location']) - _bucket, key = uri.path[1:].split('/', 1) + bucket, key = uri.path[1:].split('/', 1) + if bucket != models.BUCKET: + key = uri.path[1:] self.complete(key) else: raise KeyError("No key or location found")