[solved] CI4 request missing POST and FILES data |
I've been hitting my head against my keyboard all afternoon trying to figure this out.
I've got a page that has an image uploader. When I post from the page to a plain PHP page, the file uploads as expected. But when I post to my controller function, the POST and FILES data are empty. I think it might have something to do with where the IncomingRequest is being instantiated, but I can't figure it out. Essentially I have this route for do_upload, like: PHP Code: public function do_upload(){ Even though I seem to be posting to the page correctly, I get PHP Code: Array ( ) Array ( ) Array ( ) Meanwhile, $this->request has tons of info... but just nothing I can find about POST or FILES. Any ideas? Using CI 4.0.0 rc3 One thing I forgot to mention, I'm using some variable routing here, so I wonder if that is short-circuiting the POST. In my routes, I've got an entry like this: $routes->add('editor/do_upload/(:any)', 'Editor::do_upload'); The 3rd parameter is an ID that ties the upload back to a database record. Designer, developer and Diet Dr. Pepper addict. Messing up PHP since <?= $when['year';] ?>
|
Messages In This Thread |
[solved] CI4 request missing POST and FILES data - by jameslittle - 01-21-2020, 05:59 PM
RE: CI4 request missing POST and FILES data - by jameslittle - 01-21-2020, 09:52 PM
RE: CI4 request missing POST and FILES data - by littlej - 01-22-2020, 02:31 AM
|