-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add convenient method to save uploaded multi-part file #82
Comments
I can work on this but should |
Where do you feel is appropriate to put it? Please let me know your thoughts. |
Not too sure but may be something like this could work ? //Bad naming
type FileUpload struct {}
func (f *FileUpload) Upload (r *http.Request, key, destFile string) error {
} The main reason for this is to reduce the size of |
Aim is to provide easy use and less memory allocation. If we create struct and provide implementation passing I see one more spot other then u.SaveFile("avatar_pic", destFile) We can go with |
Not to troll but it seems better placed on the
|
Okay 😄 let's go with I will update the design. Also please let me know if you have time after this implementation. |
It's done. |
Add convenient method to save uploaded multi-part file from the request. Currently aah user can has easily access uploaded file via
Req.FormFile(key)
. However it would be good to have following methods onRequest
struct:So that aah user simply call. Example of
SaveFile
method as follows:The text was updated successfully, but these errors were encountered: