Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to profile images for fog/Google Cloud Storage #9958

Merged
merged 3 commits into from
Aug 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ module Frequency
c.validates_format_of_login_field_options = { with: Authlogic::Regex::LOGIN, message: I18n.t('error_messages.login_invalid', default: "can only consist of alphabets, numbers, underscore '_', and hyphen '-'.") }
end

has_attached_file :photo, styles: { thumb: '200x200#', medium: '500x500#', large: '800x800#' },
url: '/system/profile/photos/:id/:style/:basename.:extension'
#:path => ":rails_root/public/system/images/photos/:id/:style/:basename.:extension"
has_attached_file :photo,
styles: { thumb: '200x200#', medium: '500x500#', large: '800x800#' },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use one level of indentation for parameters following the first line of a multi-line method call.

url: '/public/system/profile/photos/:id/:style/:basename.:extension',
path: ':rails_root/public/system/public/system/profile/photos/:id/:style/:filename'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, the other way around. So the images you're finding are at users but we are pointing to profile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


do_not_validate_attachment_file_type :photo_file_name
# validates_attachment_content_type :photo_file_name, :content_type => %w(image/jpeg image/jpg image/png)
Expand Down