These two images the problem . However, if I try to upload the files after copying them on the server , same gets upload correctly.
Any help is highly appreciated.
Go to Central Administration => Security => Define blocked file types and check the file types which are blocked. If js is there that means you will not be able to upload js files to it. If js is not there then maybe it's your organization's security standard which is not allowing you to upload js files.