2015-09-14, 23:39:21
I've just started getting into GetSimple, and have put together my first small plugin. All works fine. I'm now thinking about another, that would allow some extra details to be entered and attached to an uploaded file, especially an image file.
I see from searching other posts that the function called by the file-uploaded hook has access to the $_FILES variable, which contains various details about the file just uploaded. I can see from the upload.php source that the hook is invoked just after the file is moved to its resting-place in the directories under "uploads". I can also see how the full destination path is built from the $_GET['path'] parameter. Can a plugin ascertain this location in the file-uploaded hook function, without reconstructing what upload.php does? Couldn't the hook simply pass the full pathname to the hook function as a parameter?
I see from searching other posts that the function called by the file-uploaded hook has access to the $_FILES variable, which contains various details about the file just uploaded. I can see from the upload.php source that the hook is invoked just after the file is moved to its resting-place in the directories under "uploads". I can also see how the full destination path is built from the $_GET['path'] parameter. Can a plugin ascertain this location in the file-uploaded hook function, without reconstructing what upload.php does? Couldn't the hook simply pass the full pathname to the hook function as a parameter?