mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							16 lines
						
					
					
						
							401 B
						
					
					
				
			
		
		
	
	
							16 lines
						
					
					
						
							401 B
						
					
					
				# frozen_string_literal: true
 | 
						|
 | 
						|
module Api
 | 
						|
  class AttachmentsController < ApiBaseController
 | 
						|
    skip_before_action :authenticate_user!
 | 
						|
 | 
						|
    def create
 | 
						|
      submitter = Submitter.find_by!(slug: params[:submitter_slug])
 | 
						|
 | 
						|
      attachment = Submitters.create_attachment!(submitter, params)
 | 
						|
 | 
						|
      render json: attachment.as_json(only: %i[uuid], methods: %i[url filename content_type])
 | 
						|
    end
 | 
						|
  end
 | 
						|
end
 |