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
31cd90fb
Commit
31cd90fb
authored
Apr 19, 2021
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jv-workhorse-seek' into 'master'
Add missing error returns See merge request gitlab-org/gitlab!59499
parents
e6542f12
5440c987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
workhorse/internal/upload/rewrite.go
workhorse/internal/upload/rewrite.go
+8
-2
No files found.
workhorse/internal/upload/rewrite.go
View file @
31cd90fb
...
...
@@ -192,7 +192,10 @@ func handleExifUpload(ctx context.Context, r io.Reader, filename string, imageTy
return
nil
,
err
}
tmpfile
.
Seek
(
0
,
io
.
SeekStart
)
if
_
,
err
:=
tmpfile
.
Seek
(
0
,
io
.
SeekStart
);
err
!=
nil
{
return
nil
,
err
}
isValidType
:=
false
switch
imageType
{
case
exif
.
TypeJPEG
:
...
...
@@ -201,7 +204,10 @@ func handleExifUpload(ctx context.Context, r io.Reader, filename string, imageTy
isValidType
=
isTIFF
(
tmpfile
)
}
tmpfile
.
Seek
(
0
,
io
.
SeekStart
)
if
_
,
err
:=
tmpfile
.
Seek
(
0
,
io
.
SeekStart
);
err
!=
nil
{
return
nil
,
err
}
if
!
isValidType
{
log
.
WithContextFields
(
ctx
,
log
.
Fields
{
"filename"
:
filename
,
...
...
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