Feat: authenticate direct upload (#4160)

This commit is contained in:
Tejaswini Chile
2022-03-16 13:54:18 +05:30
committed by GitHub
parent 796a7805db
commit 207a03155e
12 changed files with 174 additions and 57 deletions

View File

@@ -0,0 +1,11 @@
class Api::V1::Widget::DirectUploadsController < ActiveStorage::DirectUploadsController
include WebsiteTokenHelper
before_action :set_web_widget
before_action :set_contact
def create
return if @contact.nil? || @current_account.nil?
super
end
end