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.
18 lines
413 B
18 lines
413 B
class DocumentsController < ApplicationController
|
|
skip_before_action :verify_authenticity_token
|
|
|
|
def create
|
|
file = params[:file]
|
|
|
|
if file
|
|
render json: {
|
|
message: "Fichier reçu avec succès.",
|
|
nom: file.original_filename,
|
|
taille: file.size
|
|
}, status: :ok
|
|
else
|
|
render json: { error: "Aucun fichier reçu" }, status: :unprocessable_entity
|
|
end
|
|
end
|
|
end
|