PDA

View Full Version : AdminCP Upload Function


Andrew
10-06-2005, 06:45 PM
I'm currently trying to update one of my clients custom hacks to work with vB3.5 however I am running into issues with this one last bit of code:
$vbulletin->input->clean_array_gpc('p', array(
'imagefile' => TYPE_FILE
));

$imagefile =& $vbulletin->input->clean_gpc('p', 'imagefile', TYPE_FILE);

if (empty($imagefile)) { print_stop_message('please_complete_required_field s'); }
It was originally using the globalize() function but after looking on vB.com I saw that I needed to use the clean_array_gpc() function instead. This method worked on the other portions of the hack but they were only sending strings and ints and not files. Any ideas on what I'm doing wrong ?

Guest190829
10-06-2005, 09:57 PM
I'm currently trying to update one of my clients custom hacks to work with vB3.5 however I am running into issues with this one last bit of code:
$vbulletin->input->clean_array_gpc('p', array(
'imagefile' => TYPE_FILE
));

$imagefile =& $vbulletin->input->clean_gpc('p', 'imagefile', TYPE_FILE);

if (empty($imagefile)) { print_stop_message('please_complete_required_field s'); }
It was originally using the globalize() function but after looking on vB.com I saw that I needed to use the clean_array_gpc() function instead. This method worked on the other portions of the hack but they were only sending strings and ints and not files. Any ideas on what I'm doing wrong ?


This should work...

$imagefile = $vbulletin->input->clean_gpc('f', 'imagefile', TYPE_FILE);

Andrew
10-07-2005, 01:30 PM
That didn't work either for some reason - Keeps telling me the variable is still empy. However, my client got ahold of the original coder and he is taking care of it now. Thanks for the help though Danny - It is appreciated.