Skip to content

feat(context): add SaveUploadedFile func. - #1022

Merged
appleboy merged 4 commits into
gin-gonic:masterfrom
easonlin404:feat-upload
Jul 16, 2017
Merged

feat(context): add SaveUploadedFile func.#1022
appleboy merged 4 commits into
gin-gonic:masterfrom
easonlin404:feat-upload

Conversation

@easonlin404

Copy link
Copy Markdown
Contributor

ref #674

@codecov

codecov Bot commented Jul 15, 2017

Copy link
Copy Markdown

Codecov Report

Merging #1022 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1022      +/-   ##
==========================================
+ Coverage   96.54%   96.56%   +0.02%     
==========================================
  Files          16       16              
  Lines        1417     1428      +11     
==========================================
+ Hits         1368     1379      +11     
  Misses         39       39              
  Partials       10       10
Impacted Files Coverage Δ
context.go 96.43% <100%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cb25a6...8a47549. Read the comment docs.

c.String(http.StatusBadRequest, fmt.Sprintf("Create file err: %s", err.Error()))
return
if err := c.SaveUploadedFile(file, file.Filename); err != nil {
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return

c.String(http.StatusBadRequest, fmt.Sprintf("file open err: %s", err.Error()))
return
if err := c.SaveUploadedFile(file, file.Filename); err != nil {
c.String(http.StatusBadRequest, fmt.Sprintf("upload file err: %s", err.Error()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return

@easonlin404

Copy link
Copy Markdown
Contributor Author

@appleboy fixed. Thanks for your kind reminder.

@appleboy
appleboy merged commit 93b3a0d into gin-gonic:master Jul 16, 2017
@easonlin404
easonlin404 deleted the feat-upload branch July 16, 2017 13:20
@javierprovecho javierprovecho added this to the 1.3 milestone Jul 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants