[JS] Http file transfer

Added support for file transfers via JS. Syntax differs slightly from sys fileTransfer(), but only out of necessity.