BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
CHANGELOG
CHANGELOG
+1
-1
user.rb
app/models/user.rb
+1
-1
show.html.haml
app/views/profiles/show.html.haml
+1
-1
_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