Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled

Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 23:01:48 +02:00
co-authored by Cursor
commit c4e5f289cf
258 changed files with 11293 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
class MailImagesController < ApplicationController
before_action :require_current_project!
MAX_BYTES = 5.megabytes
ALLOWED_TYPES = %w[image/jpeg image/png image/gif image/webp].freeze
def create
file = params[:file]
unless file.respond_to?(:content_type)
return render json: { error: "Seleziona un'immagine." }, status: :unprocessable_entity
end
content_type = Marcel::MimeType.for(file, name: file.original_filename, declared_type: file.content_type)
unless ALLOWED_TYPES.include?(content_type)
return render json: { error: "Formato non valido. Usa JPG, PNG, GIF o WebP." }, status: :unprocessable_entity
end
if file.size > MAX_BYTES
return render json: { error: "L'immagine supera i 5 MB." }, status: :unprocessable_entity
end
blob = ActiveStorage::Blob.create_and_upload!(
io: file,
filename: file.original_filename.presence || "immagine",
content_type: content_type
)
render json: { url: url_for(blob) }
end
end