Welcome Guest, Not a member yet? Register   Sign In
File Upload Library and special characters
#13

OK i solved it in a different way. since I actually want to move the files from temp to a different folder I added this to the file moving:

// Move files
foreach ($this->data['data']['form_data']['userfile'] as $key => $value)
{
$new_value = preg_replace("/[^a-zA-Z0-9.]/", "_", $value);
rename('./uploads_tmp/' . $session_id . '/' . $value, './uploads/' . $new_value);
}

// Remove temp folder
rmdir('./uploads_tmp/' . $session_id . '/');

This works.
Reply


Messages In This Thread
RE: File Upload Library and special characters - by marwin - 11-24-2018, 07:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB