Add API to upload media attachments
This commit is contained in:
parent
05001d54d1
commit
ae1fac0062
19 changed files with 139 additions and 3 deletions
8
app/controllers/api/media_controller.rb
Normal file
8
app/controllers/api/media_controller.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue