How could I specify the upload file server path via js api or rest api?

Thats not possible with parse server. Currently files are saved to database or other storage providers such as Amazon or DigitalOcean. If you want to save files to local folders, you need to add your custom express route.

Edit: Seems like my statement is not true. See cbaker6’s message.