html form file upload post

Today I was working on trying to figure this application called fontello which I did. Then came the part of learning how to use their API but couldn’t get it to work. Kept getting error messages such as ‘Missed “config” param – must be file’ when I was already specifying the config file input field name in the form. After some trial and error I got it to work and here is what I learned

jquery doens’t do file upload ajax calls

online http request maker such as http://www.requestmaker.com/ dont do file upload, at least I couldn’t figure it out.

using html form, if you’re using the method post and using a file upload input (<input type=”file” name=”config”>) in the form tag it must have enctype=”multipart/form-data” or it wont work

Here is the complete code

<form action="http://fontello.com/" method="post" enctype="multipart/form-data">
Select a file: <input type="file" name="config">
<input type="submit">
</form>