Sorry that I didn't answer sooner, been kinda busy.
Thanks Mark for the answer but I already did everything that was specified and it didn't work.
I've been told that fileUpload is not an action component, so actionparam won't work as expected.
We did find a way to get the behavior we wanted by using an HTML hidden input element.
<input type="hidden" name="script" value="scipt_path" />
I'll mark the question as answered since we found a way to make this work.