How to get more information from server side

Now when upload complete, I get a local id, local file pathname, upload success(true/false) and error(true/false).
However, I need to insert the uploaded file infomation into database (all these are processed on server side), and need to return some fields such as inserted id for further usage on client side. How can I realize this?

only if you do additional ajax request to the server side to read this data.