I am currently trying to externalize some scripts to keep the clutter off my code. I put it in Notepad++ with no problems but every time I try to upload them on the static Tumblr uploader or the theme assets page I always come up with this message

Which is basically a message telling me that Tumblr uploader does not accept HTML files, where clearly the script is not an HTML and it's saved as a .js file. I really don't understand what I am doing wrong, especially when other people seem to get it right and I know how it's preferable it is to externalize scripts.
For the record .css files work perfectly without issue but it's always the .js files where I run into problems.