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
bbd1e3d8
Commit
bbd1e3d8
authored
Apr 04, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
55655599
c60d0efe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
app/uploaders/records_uploads.rb
app/uploaders/records_uploads.rb
+4
-0
changelogs/unreleased/stop-signing-avatar-paths.yml
changelogs/unreleased/stop-signing-avatar-paths.yml
+5
-0
spec/uploaders/records_uploads_spec.rb
spec/uploaders/records_uploads_spec.rb
+9
-0
No files found.
app/uploaders/records_uploads.rb
View file @
bbd1e3d8
...
...
@@ -46,6 +46,10 @@ module RecordsUploads
File
.
join
(
store_dir
,
filename
.
to_s
)
end
def
filename
upload
&
.
path
?
File
.
basename
(
upload
.
path
)
:
super
end
private
# rubocop: disable CodeReuse/ActiveRecord
...
...
changelogs/unreleased/stop-signing-avatar-paths.yml
0 → 100644
View file @
bbd1e3d8
---
title
:
Speed up generation of avatar URLs when using object storage
merge_request
:
author
:
type
:
performance
spec/uploaders/records_uploads_spec.rb
View file @
bbd1e3d8
...
...
@@ -94,4 +94,13 @@ describe RecordsUploads do
expect
{
uploader
.
remove!
}.
to
change
{
Upload
.
count
}.
from
(
1
).
to
(
0
)
end
end
describe
'#filename'
do
it
'gets the filename from the path recorded in the database, not CarrierWave'
do
uploader
.
store!
(
upload_fixture
(
'rails_sample.jpg'
))
expect_any_instance_of
(
GitlabUploader
).
not_to
receive
(
:filename
)
expect
(
uploader
.
filename
).
to
eq
(
'rails_sample.jpg'
)
end
end
end
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