-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save memory #26
Save memory #26
Conversation
isubata/webapp/go/src/isubata/app.go
Outdated
if err != nil { | ||
return err | ||
} | ||
if _, err := io.Copy(dst, f); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naruhodo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
信じている
return err | ||
} | ||
defer dst.Close() | ||
f, err := fh.Open() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f
はClose
しなくていい?
|
POST /profile
で画像をメモリに読み込んでからファイルに書き出している.むだなので
io.Copy
でやりたい.ファイル名が変わるけどレギュレーション的にはセーフだったはず
cc @0gajun