I have a control application that has a file upload field(Data Type(Document File Name) ) on it to upload files.
If I use the normal submit functionality the file can be accessed with $_SESSION[‘scriptcase’][‘app_name’][‘glo_nm_path_doc’] . “/” . {fileuploadedile} which is the normal Document Path of the application as set in the application setting eg /opt/NetMake/v81/wwwroot/scriptcase/file/doc/Content.doc
However, if I use an Ajax button to submit the control form, the behaviour is different , the file is uploaded and kept in a temporary location with a temp filename:
/opt/NetMake/v81/wwwroot/scriptcase/tmp/sc_e346a63d_Content.doc
Is this functioning as designed? Is it expected that I must move and rename the file “manually” ?
I have tried $_FILES[‘attach’][‘tmp_name’] , where ‘attach’ is the name of the file input field , this returns:
[SIZE=14px]array(1) { [0]=> string(0) “” }
The files array [/SIZE]$_FILES[‘attach’] returns:
[SIZE=14px]array(5) { [“name”]=> array(1) { [0]=> string(0) “” } [“type”]=> array(1) { [0]=> string(0) “” } [“tmp_name”]=> array(1) { [0]=> string(0) “” } [“error”]=> array(1) { [0]=> int(4) } [“size”]=> array(1) { [0]=> int(0) } }[/SIZE]
It’s blank? error=4
UPLOAD_ERR_NO_FILE
Value: 4; No file was uploaded
For some context here is a pic of the form, both buttons call the same php method… “Send Mail” is an ajax button. [ATTACH=CONFIG]n72707[/ATTACH]