I am creating a script in which it had to upload a image for that i am using the Filedialog but when i am running the test i am getting the error "fileDialog is not a supported command for uploaded scripts"

No. It's intentional to prevent a possible avenue for attack by opening up access to the agent filesystems.

The fileDialog support was only ever in the original agents (urlblast) from when it was used for automation testing in a closed environment. I'll remove it (and other commands in a similar circumstance) from the docs.