need help to make a plugin.

i'm new to elgg and php,please help me.
i need a help to make a plugin. I want to upload a file to data folder. And iframe the file in view of that object along with title and description. Pls reply with some sample codes.
Can anyone tell how to save a file and get the link to file.