Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1873

Extension Writers Discussion • How to access file uploads in form submissions

$
0
0
I'm trying to upload a file (an image, specifically) but I'm running into some issues. Namely I can't get a hold of the file after the form is submitted.

I have this and am trying to contain the file in my variable like so:

Code:

$file_upload = $request->variable( 'my_uploaded_file', [], true, 'FILES' );
But when I dump and die the variable, I get an empty array (the default value I'm setting in the method).

How do I get access to the file I've uploaded? I'm sure this is simple but I'm completely stumped here.

edit:

I've double checked my form tags and I believe my HTML is correct too. I'm not missing the enctype.

Code:

<form action="{{ U_ACTION }}" method="post" enctype="multipart/form-data">

Statistics: Posted by danieltj — Fri Jul 12, 2024 11:00 am



Viewing all articles
Browse latest Browse all 1873

Trending Articles