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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
91c9c4b7
Commit
91c9c4b7
authored
Jun 28, 2018
by
Micaël Bergeron
Committed by
Stan Hu
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an issue with local files
parent
cebdd267
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
25 deletions
+8
-25
app/uploaders/file_uploader.rb
app/uploaders/file_uploader.rb
+8
-6
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
+0
-19
No files found.
app/uploaders/file_uploader.rb
View file @
91c9c4b7
...
...
@@ -162,12 +162,14 @@ class FileUploader < GitlabUploader
end
def
copy_file
(
file
)
if
file_storage?
store!
(
file
)
to_path
=
if
file_storage?
File
.
join
(
self
.
class
.
root
,
store_path
)
else
self
.
file
=
file
.
copy_to
(
store_path
)
record_upload
# after_store is not triggered
store_path
end
self
.
file
=
file
.
copy_to
(
to_path
)
record_upload
# after_store is not triggered
end
private
...
...
spec/lib/gitlab/gfm/uploads_rewriter_spec.rb
View file @
91c9c4b7
...
...
@@ -80,24 +80,5 @@ describe Gitlab::Gfm::UploadsRewriter do
subject
{
rewriter
.
files
}
it
{
is_expected
.
to
be_an
(
Array
)
}
end
describe
'with object storage'
do
before
do
stub_uploads_object_storage
(
uploader:
FileUploader
)
zip_uploader
.
migrate!
(
FileUploader
::
Store
::
REMOTE
)
end
describe
'#needs_rewrite?'
do
subject
{
rewriter
.
needs_rewrite?
}
it
{
is_expected
.
to
eq
false
}
end
describe
'#files'
do
subject
{
rewriter
.
files
}
it
{
is_expected
.
to
eq
([])
}
end
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