summaryrefslogtreecommitdiff
path: root/service/http/uploads.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-13 14:02:14 +0300
committerWolfy-J <[email protected]>2018-06-13 14:02:14 +0300
commitb58bbaa615f38916860e06db27e2ab31b0eb2d08 (patch)
tree8e446b203dd3c2ab47147a6efd864416a88af841 /service/http/uploads.go
parent8b24183daa620bb12edf78f6e81697532cbc92d8 (diff)
more tests for files!
Diffstat (limited to 'service/http/uploads.go')
-rw-r--r--service/http/uploads.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/service/http/uploads.go b/service/http/uploads.go
index 1f3060c0..99484f4b 100644
--- a/service/http/uploads.go
+++ b/service/http/uploads.go
@@ -73,8 +73,8 @@ type FileUpload struct {
// Name contains filename specified by the client.
Name string `json:"name"`
- // MimeType contains mime-type provided by the client.
- MimeType string `json:"type"`
+ // Mime contains mime-type provided by the client.
+ Mime string `json:"mime"`
// Size of the uploaded file.
Size int64 `json:"size"`
@@ -92,10 +92,10 @@ type FileUpload struct {
// NewUpload wraps net/http upload into PRS-7 compatible structure.
func NewUpload(f *multipart.FileHeader) *FileUpload {
return &FileUpload{
- Name: f.Filename,
- MimeType: f.Header.Get("Content-Type"),
- Error: UploadErrorOK,
- header: f,
+ Name: f.Filename,
+ Mime: f.Header.Get("Content-Type"),
+ Error: UploadErrorOK,
+ header: f,
}
}