For a nicer input file
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



An easy and flexible way to make up your input files. Take a look at the example file to se how easy it is.

  • Requires jQuery 1.3+

A simple example

You only need to have a input type file, and write


If you want to customize the fake input file html you can

$("#your-input-file").prettyfile({ html: "Choose FileChoose a file" });

Available options

Property Type Default Description
setvalue Boolean true Write the file name on the phclass element after triggering the file change function.
html String "Browse files" Default markup for the fake input file, you can change it.
phclass String "pf_ph" Class for the placeholder filename. That's the element where the file name will be written.
phcontclass String "pf_ph_cont" The html option will be wrapped with a span with this class.
wrapclass String "pf_wrap_class" The input and the wrapped html element will be wraped by a span with this class.
selectedclass String "selected" When you trigger the change function you will add that selectedclass to the wrapper.

There's something wrong with the plugin!

It's possible, noooooobody is perfect :) If you find problems with this plugin you can post an issue here and I'll try to solve it as soon as possible.

I also accept that my english is not as good as it should be :) if you find any mistake in this text let me know!


If you don't remember where did you find this plugin remember that you can grab the latest version from github. You can also download it in a zip file.