My filename changes after the upload. What it is the way to get the new filename from Javascript API?

We convert filename to a valid format. If your filename contains unacceptable symbols they will be stripped. Valid symbols include  ASCII letters, digits, "_" symbol and a proper file extension. 

If your backend needs to know what the new filename is after the upload checkout  this snippet in python.

For client side, this Javascript function will do the same: