Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » pickup subdir from table and put into upload_subdir
Re: pickup subdir from table and put into upload_subdir [message #1562 is a reply to message #1561] Fri, 22 August 2008 04:57 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
You are incorrect when you say that _cm_initialiseFileUpload() will be called a second time when you submit an uploaded file. It is only called when the component is first activated. When you submit a file name it is the _cm_fileUpload() method which is called.

Calling the argument "$fieldarray" should not be misleading as that is the generic name that is used for an associative array. If you automatically assume that this is the contents of $fieldarray in the calling task then your assumption is incorrect - it is only the $where string which is passed from the parent to the child task, and this string is then converted into an associative array.

Although by default the $where string which is extracted from a parent object and passed to a child object is the primary key of the parent object, it is possible to modify it at the point of extraction. For example, if the filepicker is activated from a POPUP button then $where can be set to whatever you like in the _cm_popupCall() method.

I have changed std.filepicker1.inc so that it is passed the $where string from the parent task, and this string is therefore available to be passed from the filepicker to the fileupload task. This will then be available in both the _cm_initialiseFileUpload() and _cm_fileUpload() methods.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Filter values of fields depending on other fields
Next Topic: Use the ADD5 template
Goto Forum:
  


Current Time: Mon Apr 29 11:48:50 EDT 2024

Total time taken to generate the page: 0.01084 seconds