Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8f601447
Commit
8f601447
authored
Dec 02, 2014
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change avatar file size to 200kb.
parent
3a723ad2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
CHANGELOG
CHANGELOG
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+1
-1
app/views/shared/_choose_group_avatar_button.html.haml
app/views/shared/_choose_group_avatar_button.html.haml
+1
-1
No files found.
CHANGELOG
View file @
8f601447
...
...
@@ -8,7 +8,7 @@ v 7.6.0
-
-
-
-
-
Change maximum avatar file size from 100KB to 200KB
-
-
-
...
...
app/models/user.rb
View file @
8f601447
...
...
@@ -124,7 +124,7 @@ class User < ActiveRecord::Base
validate
:namespace_uniq
,
if:
->
(
user
)
{
user
.
username_changed?
}
validate
:avatar_type
,
if:
->
(
user
)
{
user
.
avatar_changed?
}
validate
:unique_email
,
if:
->
(
user
)
{
user
.
email_changed?
}
validates
:avatar
,
file_size:
{
maximum:
1
00
.
kilobytes
.
to_i
}
validates
:avatar
,
file_size:
{
maximum:
2
00
.
kilobytes
.
to_i
}
before_validation
:generate_password
,
on: :create
before_validation
:sanitize_attrs
...
...
app/views/profiles/show.html.haml
View file @
8f601447
...
...
@@ -83,7 +83,7 @@
%span
.file_name.js-avatar-filename
File name...
=
f
.
file_field
:avatar
,
class:
"js-user-avatar-input hidden"
.light
The maximum file size allowed is
1
00KB.
.light
The maximum file size allowed is
2
00KB.
-
if
@user
.
avatar?
%hr
=
link_to
'Remove avatar'
,
profile_avatar_path
,
data:
{
confirm:
"Avatar will be removed. Are you sure?"
},
method: :delete
,
class:
"btn btn-remove btn-small remove-avatar"
...
...
app/views/shared/_choose_group_avatar_button.html.haml
View file @
8f601447
...
...
@@ -4,4 +4,4 @@
%span
.file_name.js-avatar-filename
File name...
=
f
.
file_field
:avatar
,
class:
'js-group-avatar-input hidden'
.light
The maximum file size allowed is
1
00KB.
.light
The maximum file size allowed is
2
00KB.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment