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
a7a3ce2e
Commit
a7a3ce2e
authored
Jan 09, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delegate the ObjectStorage upload fetching
parent
d5aebda4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ee/app/uploaders/object_storage.rb
ee/app/uploaders/object_storage.rb
+7
-7
No files found.
ee/app/uploaders/object_storage.rb
View file @
a7a3ce2e
...
...
@@ -20,11 +20,17 @@ module ObjectStorage
module
RecordsUploads
extend
ActiveSupport
::
Concern
inclu
ded
do
|
base
|
prepen
ded
do
|
base
|
raise
ObjectStoreUnavailable
,
"
#{
base
}
must include ObjectStorage::Concern to use extensions."
unless
base
<
Concern
base
.
include
(
::
RecordsUploads
::
Concern
)
end
def
initialize
(
model
=
nil
,
mounted_as
=
nil
)
super
self
.
upload
=
model
&
.
try
(
:"
#{
mounted_as
}
_upload"
,
self
)
if
mounted_as
end
def
upload
=
(
upload
)
return
unless
upload
...
...
@@ -45,12 +51,6 @@ module ObjectStorage
attr_reader
:object_store
def
initialize
(
model
=
nil
,
mounted_as
=
nil
)
super
self
.
upload
=
model
&
.
try
(
:"
#{
mounted_as
}
_upload"
,
self
)
end
class_methods
do
def
object_store_options
storage_options
&
.
object_store
...
...
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