Thank you for your reply. I tried changing the code but still not uploading or changing if the file exist.to give you an idea here is the rest of the code:
the code used for the text area. this one displays the text and can be edited.
code i used for file type. this code displays the current file if any and a browse button for upload but its not making any changes to the file attribute.
By the way the code is inside a form: the form edits the status of the record from one location to Archive. I dont know how to pass the changes to the file attribute.