Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

File input support #1

kmayoral opened this Issue Aug 4, 2011 · 12 comments


None yet
8 participants

kmayoral commented Aug 4, 2011

Hi all,

Just wanted to say great job on this so far, support for file inputs would be quite helpful!


precision commented Aug 4, 2011

Can you elaborate on where you would like file inputs? On the API call test? Or to upload API configuration settings?

kmayoral commented Aug 4, 2011

Hey, thanks for the reply. I was thinking as an option for the type of
parameter that can be made in an API test call. Seems like it would require
a complete redesign of the request procedure to do some sort of hidden
iframe from approach, right? Well that's just what I was thinking....
On Aug 3, 2011 6:51 PM, "precision" <

Can you elaborate on where you would like file inputs? On the API call
test? Or to upload API configuration settings?

Reply to this email directly or view it on GitHub:
#1 (comment)


mansilladev commented Aug 4, 2011

kmayoral - as in an upload file functionality?

@mansilladev mansilladev closed this Aug 4, 2011

@mansilladev mansilladev reopened this Aug 4, 2011

kmayoral commented Aug 4, 2011

hi mansilladev, yup, upload file functionality like what is present in an HTML form input of this type: Does that make sense?


kmiyashiro commented Aug 5, 2011

Yeah, never got around to this. Was planning on using https://github.com/felixge/node-formidable


hillct commented Sep 5, 2012

I see there's no progress on this issue. It would certainly be useful to be able to accept a file (as in form input of type="file") where and API method requiring and uploaded file as an argument could be adequately documented using iodocs. Until then I guess https://github.com/wordnik/ Swagger is the way to go...


mansilladev commented Sep 5, 2012

hillct -- if you're interested in media upload support, can you talk a bit about your API and how you handle the uploads? Do you accept uploads on the initial call where you accept metadata as well as the binary data? What are the file types you handle, and what are the typical and large edge-case file sizes? Thanks!


hillct commented Sep 10, 2012

I would think that such support should be as generic as possible but in mu specific use case we upload the file in the same POST operation as metadata fields. In my current project we're operating upon image files of types JPG, GIF, and PNG but I imagine an array could be passed, of acceptable media types for the upload, such that APIs accepting any file type can be adequately documented. I would tend to agree with you that the JSON used to model the API should also support an upload size limit, for security if for no other reason. In my current project the size range would be up to 17MB but typically around 6MB.

While I'm thinking about it it would likely be generally valuable to be able to specify alternate test output templates, where for example, an API call might yield binary output to which the best test result is a link to the output URL itself, or a template consisting of a flash viewer, calling the test result URL, or any number of other possibilities.

In such a scenerio, the JSON modeling modeling the method call would include an element 'testOutputTemplate' pointing to a file containing the output template formatting.

I implemented a solution for this in our fork, along with a couple of other goodies: funmachine/iodocs. It is pretty straightforward and probably covers the common use case, but it might not fit everyone's needs.

Note that our starting point was the jasonmccreary/iodocs fork, so it would require a little effort to merge this cleanly.

mansilladev pushed a commit that referenced this issue Aug 7, 2013

Merge pull request #1 from mansilladev/patch-1
Name updates to OAuth 2.0 APIs in apiconfig.json

Any progress?


phairow commented Dec 10, 2014

There have been some forks with implementations and the next version of io docs will include support for file upload parameters.

Has this functionality been added in master yet?

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