Send correct path on file upload when using public app

Fix issue #7152