Skip to content

Commit

Permalink
[1608] Cleanup/Removing unnecessary TODO (implemented elsewhere)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones committed Jan 6, 2012
1 parent b45d76e commit a4013bc
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions ckan/controllers/storage.py
Expand Up @@ -177,7 +177,6 @@ def upload_handle(self):
bucket=BUCKET, label=label)
# Do not redirect here as it breaks js file uploads (get infinite loop
# in FF and crash in Chrome)

return self.success(label)

def success(self, label=None):
Expand All @@ -187,19 +186,7 @@ def success(self, label=None):
label=label,
qualified=True
)
c.upload_url = h.url_for('storage_upload')

# TODO:
# Publish a job onto the queue for the archiver so that it can check
# this resource and upload to somewhere else out of bounds to this
# request
# from ckan.lib.celery_app import celery
# from ckan.model.types import make_uuid
# task_id = make_uuid()
# context = {}
# data = label
# celery.send_task("archiver.upload", args=[context, data], task_id=task_id)

c.upload_url = h.url_for('storage_upload')
return render('storage/success.html')

def success_empty(self, label=None):
Expand All @@ -212,13 +199,11 @@ def file(self, label):
# handle erroneous trailing slash by redirecting to url w/o slash
if label.endswith('/'):
label = label[:-1]
file_url = h.url_for(
'storage_file',
label=label
)
file_url = h.url_for( 'storage_file', label=label )
h.redirect_to(file_url)
else:
abort(404)

file_url = self.ofs.get_url(BUCKET, label)
if file_url.startswith("file://"):
metadata = self.ofs.get_metadata(BUCKET, label)
Expand Down

0 comments on commit a4013bc

Please sign in to comment.