Skip to content

Commit

Permalink
temp fix
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
  • Loading branch information
rht committed Jan 20, 2016
1 parent 666b755 commit 354b964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions commands/files/multipartfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ func NewFileFromPart(part *multipart.Part) (File, error) {

func NewFileFromRequest(r *http.Request) (File, error) {
contentType := r.Header.Get(contentTypeHeader)
mediaType, _, err := mime.ParseMediaType(contentType)
if err != nil {
return nil, err
}
mediaType, _, _ := mime.ParseMediaType(contentType)
var err error
f := &MultipartFile{Mediatype: mediaType}
if f.IsDirectory() {
f.Reader, err = r.MultipartReader()
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0111-gateway-writeable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ test_expect_success "HTTP POST multiple files gives Hash" '
curl -v --form "infile1=@infile1" --form "infile2=@infile2" "$URL" 2>curl_post.out &&
grep "HTTP/1.1 201 Created" curl_post.out &&
LOCATION=$(grep Location curl_post.out) &&
HASH=$(echo $LOCATION | cut -d":" -f2- |tr -d " \n\r") &&
HASH=$(echo $LOCATION | cut -d":" -f2- |tr -d " \n\r")
'

test_expect_success "We can ipfs get the files just created" '
Expand Down

0 comments on commit 354b964

Please sign in to comment.