Problem with file upload #19

Open
ghost opened this Issue Dec 11, 2012 · 4 comments

Projects

None yet

3 participants

@ghost
ghost commented Dec 11, 2012

it's api code

describe_service "/image" do |service|
  service.formats   :json
  service.http_verb :post
  service.disable_auth # on by default

  #INPUT
  service.param.file  :upload_file

  # OUTPUT
  service.response do |response|
    response.object do |obj|

    end
  end

  # DOCUMENTATION
  service.documentation do |doc|
    doc.overall "test"
  end

  service.implementation do

  end

end

It's file upload page

<html>
<head>
    <title>file upload form</title>
</head>
<body>
<form enctype="multipart/form-data" action="image" method="post">
    Select file:<br>
    <input name="upload_file" type="file"><br>
    <input type="submit" value="upload">
</form>
</body>
</html>

when I upload the file ,get exception

{"error":"Request included unexpected parameter: upload_file"}
theCrab commented Jan 8, 2014

@mattetti any idea why this is a bug?

Owner
mattetti commented Jan 8, 2014

Unfortunately, I don't :(

On Wed, Jan 8, 2014 at 1:48 PM, The Crab notifications@github.com wrote:

@mattetti https://github.com/mattetti any idea why this is a bug?


Reply to this email directly or view it on GitHubhttps://github.com/mattetti/Weasel-Diesel/issues/19#issuecomment-31881280
.

theCrab commented Jan 8, 2014

I am thinking it's down to the service.response block.

dsshap commented Jun 5, 2014

@theCrab were you able to figure this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment