Creating Custom "File Upload" Field

Hello,

I want to create custom file type field for upload file. I have create one field and change its type in vardef. 

But when I Upload file it save without extension and without original name. In record view original name show properly.

Please refer attachments.This is uploaded fiel

This is downloaded file