but with wordpress normally gets stuck.
How does it get stuck? Does it stop, or uploads slowly? Check the logs to see if WordPress is telling about any problem with the current stack and configuration.
a 5 Mb file transfer almost immediately on filezilla by ftp
FTP is a native TCP protocol that uses a bare TCP stream to transfer the data. Your 500 MBPS (ps, right?) connection has a good throughput to upload a 5 MB file immediately.
WordPress relies on several layers before the packet can be sent. You are using WordPress on a web browser, which in turn is based on a runtime/language and that uses the OS stack to transmit the data on TCP protocol. Still, it should not be this much slow, maybe 1-4 seconds to upload a file, maximum.
Try this SO thread and see if this works.
Try changing the browser, or better, see if there are any bandwidth limitations on the service.
Which OS are you using?