diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-05 17:46:36 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-05 17:46:36 +0200 |
commit | ae1fac006206ab28cd7cba63ab85c07a27f3d606 (patch) | |
tree | 61f9cd45d7ed804eab85ae6a28cee584af90bfe3 /app/controllers | |
parent | 05001d54d15c486caa6cebe9462222d37d87576d (diff) |
Add API to upload media attachments
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/media_controller.rb | 8 |
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 |