zyON Posted May 26, 2014 Share Posted May 26, 2014 I'm using hooks to process documents after the upload on a page. I've 3 different fields that can be used for uploading documents like "photos", "pdfs", "floorplans". How can I know which field on the page activated the hook so I can process them differently? Thanks. Link to comment Share on other sites More sharing options...
zyON Posted May 26, 2014 Author Share Posted May 26, 2014 Ok, found it: Using a InputfieldFile::fileAdded hook that returns a pageFile object: public function addFile($event){ $file = $event->arguments(0); // file uploaded $field = $file->field->name; // name of the field on the page used for uploading the file (...) } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now