diff options
| author | mo khan <mo@mokhan.ca> | 2014-06-08 21:28:45 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-06-08 21:28:45 -0600 |
| commit | efbcdb4d25a7fe12c0b317b146a87c433f951e7b (patch) | |
| tree | 262207f392922eba217f0fd847ce56fae052ab2f /app/controllers | |
| parent | 00743ed74a1e988258d755e708e8a4e168792ce8 (diff) | |
add controller to display s3 objects.
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/admin/blobs_controller.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/controllers/admin/blobs_controller.rb b/app/controllers/admin/blobs_controller.rb new file mode 100644 index 00000000..e239ba23 --- /dev/null +++ b/app/controllers/admin/blobs_controller.rb @@ -0,0 +1,22 @@ +module Admin + class BlobsController < AdminController + def index + @objects = bucket.objects + end + + def show + @object = bucket.objects[params[:id]] + end + + private + + def connection + @connection ||= AWS::S3.new + end + + def bucket + bucket_name = ENV['FOG_DIRECTORY'] + connection.buckets[bucket_name] + end + end +end |
