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
6979dd0c
Commit
6979dd0c
authored
Mar 07, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix filename bug
parent
4804b612
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
ee/app/uploaders/object_storage.rb
ee/app/uploaders/object_storage.rb
+9
-9
No files found.
ee/app/uploaders/object_storage.rb
View file @
6979dd0c
...
@@ -182,6 +182,15 @@ module ObjectStorage
...
@@ -182,6 +182,15 @@ module ObjectStorage
end
end
end
end
# allow to configure and overwrite the filename
def
filename
@filename
||
super
||
file
&
.
filename
# rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def
filename
=
(
filename
)
@filename
=
filename
# rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def
file_storage?
def
file_storage?
storage
.
is_a?
(
CarrierWave
::
Storage
::
File
)
storage
.
is_a?
(
CarrierWave
::
Storage
::
File
)
end
end
...
@@ -341,15 +350,6 @@ module ObjectStorage
...
@@ -341,15 +350,6 @@ module ObjectStorage
self
.
store!
(
UploadedFile
.
new
(
file_path
,
filename
))
self
.
store!
(
UploadedFile
.
new
(
file_path
,
filename
))
end
end
# allow to configure and overwrite the filename
def
filename
@filename
||
super
||
file
&
.
filename
# rubocop:disable Gitlab/ModuleWithInstanceVariables
end
def
filename
=
(
filename
)
@filename
=
filename
# rubocop:disable Gitlab/ModuleWithInstanceVariables
end
# this is a hack around CarrierWave. The #migrate method needs to be
# this is a hack around CarrierWave. The #migrate method needs to be
# able to force the current file to the migrated file upon success.
# able to force the current file to the migrated file upon success.
def
file
=
(
file
)
def
file
=
(
file
)
...
...
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