So you're saying you're first acquiring a token, then attempting to upload a file to Esri's sample server? If so, then that might be why it's working in Postman but not via a basic jQuery AJAX request. I'm assuming in Postman you've got a configuration referencing the token acquired, but I don't see anything in your code that does a similar reference. Fill me in if I'm wrong on that.
With respect to finding the service URL of a service, if you're looking at that service or Feature Layer in ArcGIS online (aka AGOL), often you'll find a "URL" box in the lower right with options to copy or view that URL, which gets you to the REST endpoint of your specific service. I'm including a screen grab here.