i am student and i must to do project about web app by Ruby on rails
i can not do past upload file.i try looking code but i just meet upload file image.
i want to code upload file that it must to filter (validate) when file is PDF or postscript.if you have code or you can tell me please help me.

ps.i want to upload PDF and postscirpt file

and when i upload file finish file will store at database
...