allow avatars up to 1000px

This commit is contained in:
Régis Hanol 2016-07-05 18:49:33 +02:00
parent 3588780ac3
commit c104e4c022

View file

@ -83,7 +83,7 @@ class UserAvatarsController < ApplicationController
return render_blank unless upload_id > 0 && user_avatar = user.user_avatar return render_blank unless upload_id > 0 && user_avatar = user.user_avatar
size = params[:size].to_i size = params[:size].to_i
return render_blank if size < 8 || size > 500 return render_blank if size < 8 || size > 1000
if !Discourse.avatar_sizes.include?(size) && Discourse.store.external? if !Discourse.avatar_sizes.include?(size) && Discourse.store.external?
closest = Discourse.avatar_sizes.to_a.min { |a,b| (size-a).abs <=> (size-b).abs } closest = Discourse.avatar_sizes.to_a.min { |a,b| (size-a).abs <=> (size-b).abs }