Php uploading file with progress bar

Hello there,

I successfully integrated file upload with jQuery and calling a php function. However the php file cannot contain any typo3 use calls, $globals[‘tsfe’] so that inserting into a database with typo3 11 interface seems not to be possible.
Somebody can help with that or is there code available to make a file upload possible with post-treatment in php with typo3 standard functions

In advance many thanks