about summary refs log tree commit diff
path: root/app/controllers/api/media_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/media_controller.rb')
-rw-r--r--app/controllers/api/media_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/api/media_controller.rb b/app/controllers/api/media_controller.rb
new file mode 100644
index 000000000..d5a0a124a
--- /dev/null
+++ b/app/controllers/api/media_controller.rb
@@ -0,0 +1,8 @@
+class Api::MediaController < ApiController
+  before_action :doorkeeper_authorize!
+  respond_to    :json
+
+  def create
+    @media = MediaAttachment.create!(account: current_user.account, file: params[:file])
+  end
+end