What am I missing, I can't seem to get the file name of a file that I've uploaded other lines of code in the same function work ok
Code:
function AddPolicy as v (e as p) 'This function is called after the file(s) selected in the Upload Files dialog have been uploaded to the server. 'The function is responsible for processing each uploaded file. 'The passed in 'e' object contains these properties dim text2 as c text2 = e.fileArray[1].fileName save_to_file(text2, "C:\A5Webroot\Documents\Fileinfo.txt") 'e.fileCount - the number of files that were uploaded 'e.fileArray - a property array with one entry for each uploaded file 'e.uploadProperties - Contains multiple sub-properties for all of the properties set in the Action builder. 'e.rv - Request variables 'e.tmpl - pointer to the Grid definition 'e.rtc - a pointer variable that contains run-time calculations 'e.__si - state information 'e.session - session variables 'e.rowNumber - row number of the Grid row that has focus. If val(e.rowNumber) < 0, then it is a new record row. 'e.part - either 'G' (for 'Grid') or 'D' (for 'DetailView'). Test left(e.part,1) = "D" .or left(e.part,1) = "G" 'e.primaryKeyArray - an array of primary key values for the current row's primary key. If the primary key is based on a single field (or record number in the case of a .dbf table), the array will have one entry. If the primary key comprises multiple columns, the array will have an entry for each column in the primary key. 'e._isLinkedGrid - .t. if the Grid is a linked Grid (i.e. it has a parent Grid) 'e._linkValues = linking value. Contains a CRLF delimited list of linking values in this format: fieldname|type|linkingValue 'Each entry in the e.fileArray array has these propeties (where 'i' is between 1 and e.fileCount): 'e.fileArray[i].file.characterSet - character set of the uploaded file 'e.fileArray[i].file.contentType - MIME type (e.g. 'application/octet-stream') 'e.fileArray[i].data - data that was uploaded. This will either be binary data or text data. Check the .file.dataType property 'e.fileArray[i].fileName - filename of the file on the client machine 'e.fileArray[i].encoding - For text files, specifies the encoding type 'e.fileArray[i].file.dataType = Either 'text' or 'binary' 'If you want to send any Javascript back to the browser to execute after this event has completed, you can set this property: 'e.javascript 'EXTREMELY IMPORTANT - The Javascript that is sent back to the browser is executed in the context of the IFrame that contains the File Select window. 'Therefore, in order for the Javascript you send back to invoke methods of the Grid object, you must prefix all methods with 'window.parent'. 'For example: window.parent.{grid.object}.refresh() 'You can set e.abort = .t. to abort the operation. If you set e.abort to .t. then you can set e.errorText to the text you want to display to the user. end function
Comment