I noticed that the MediaWiki's action=upload actually returns lot of interesting things (like my userid, image width/height, ..) but I'm somehow surprised to do not see the pageid. This would be expected during a page creation via an upload.
In theory it should be easy to expand the API response to eventually provide it - if known. Pratically, I think that the pageid is lost during some underlying calls and this may need a refactor.
To give an eye on the current implementation of ApiUpload#performUpload() see here:
At the time of writing this is what the action=upload returns when creating a page like I have done in https://commons.wikimedia.org/wiki/Special:PermaLink/521509832 with action=upload, comment=.., text=.. and filename=..:
Well, intuitively someone may expect the pageid exposed as upload->pageid as well as we are exposing the filename as upload->filename but it would be nice to request some comments about this.