Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
sh8 committed Dec 5, 2017
1 parent dc121ac commit 2bdb507
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions videoupload.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Video struct {

// Save video file with permission 0600
func (v *Video) Save(filename string) error {
return ioutil.WriteFile(filename, i.Data, 0600)
return ioutil.WriteFile(filename, v.Data, 0600)
}

// Get hash sum for creating unique file name
Expand Down Expand Up @@ -53,12 +53,12 @@ func Process(r *http.Request, field string) (*Video, error) {
return nil, err
}

i := &Video{
v := &Video{
Filename: info.Filename,
ContentType: contentType,
Data: bs,
Size: len(bs),
}

return i, nil
return v, nil
}

0 comments on commit 2bdb507

Please sign in to comment.