From 401498eccbaae83929b7e5c77415e41a76aef475 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 17 Dec 2023 23:09:35 +0100 Subject: [PATCH] Bump upload max filesize --- app/uploaders/base_uploader.rb | 2 +- app/uploaders/profile_header_uploader.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/uploaders/base_uploader.rb b/app/uploaders/base_uploader.rb index c93fbffa..ddf5152c 100644 --- a/app/uploaders/base_uploader.rb +++ b/app/uploaders/base_uploader.rb @@ -15,7 +15,7 @@ class BaseUploader < CarrierWave::Uploader::Base def store_dir = "/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - def size_range = (1.byte)..(2.megabytes) + def size_range = (1.byte)..(5.megabytes) def paperclip_path return "/users/:attachment/:id_partition/:style/:basename.:extension" if APP_CONFIG["fog"].blank? diff --git a/app/uploaders/profile_header_uploader.rb b/app/uploaders/profile_header_uploader.rb index 23a47588..649ab10e 100644 --- a/app/uploaders/profile_header_uploader.rb +++ b/app/uploaders/profile_header_uploader.rb @@ -1,7 +1,7 @@ class ProfileHeaderUploader < BaseUploader - def default_url(*args) - "/images/header/#{[version_name || args.first, 'no_header.jpg'].compact.join('/')}" - end + def default_url(*args) = "/images/header/#{[version_name || args.first, 'no_header.jpg'].compact.join('/')}" + + def size_range = (1.byte)..(10.megabytes) version :web do process resize_to_fit: [1500, 350]