summaryrefslogtreecommitdiff
path: root/app/controllers/admin/blobs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/blobs_controller.rb')
-rw-r--r--app/controllers/admin/blobs_controller.rb22
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