Jun 3rd, 2011, 5:18 AM
Thanks for the reply!
I have confirmed that the file was uploaded (i have shell access on that machine).
I now use kind of a workaround for that file problem...
For copying the uploaded files into the target upload directory, i use something like in the older thread i linked to in my first post:
For displaying i store the filenames into some new field inside of the session (kind of abusing it).
I can then access $fields['uploadname1'] on the next page (after $fields = ft_api_init_form_page();
Like this it works for me.
I have confirmed that the file was uploaded (i have shell access on that machine).
I now use kind of a workaround for that file problem...
For copying the uploaded files into the target upload directory, i use something like in the older thread i linked to in my first post:
Code:
// Define the upload location
$target_path = "/somewhere/";
// Create the file name with path
$filename = basename( $_FILES['YOUR FILE FIELD NAME']['name']);
// Try to move the file from the temporay directory to the defined.
if(move_uploaded_file($_FILES['YOUR FILE FIELD NAME']['tmp_name'], $target_path . $filename )) {
echo "The file ". basename( $_FILES['YOUR FILE FIELD NAME']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
}
For displaying i store the filenames into some new field inside of the session (kind of abusing it).
Code:
$_SESSION[form_tools_form]['uploadname1] = $filename;
I can then access $fields['uploadname1'] on the next page (after $fields = ft_api_init_form_page();
Like this it works for me.
(Jun 3rd, 2011, 1:33 AM)Ben Wrote:Quote:Is accessing it by $fields['uploadfield'] correct?
Ah, no! I don't think so... if that will contain anything, it will contain the filename. (I'll have to look into that).
Could you confirm via an FTP client that the file was, in fact uploaded?
- Ben