chained events a la brendo and input type="file" uploads
This is an open discussion with 1 reply, filed under General.
Search
Keep in mind that the $_FILES
array is a completely different beast to the usual $_POST
array, have a read of the PHP manual about that array.
Symphony does manipulate the $_FILES
array and attempts to merge it into the $_POST
array using the General::getPostData
function, but this only happens once the event.section.php
file is included, so anything prior to that line in the trigger
function should be ok.
I really need to finish/update/tidy up that tutorial, there's been a couple of additional requests around the same subject. It's definitely on the list so to speak :)
Create an account or sign in to comment.
first off, not enough can be said about brendo's detailed look at symphony events. not only did it help me overcome an obstacle with a project, but after doing it just one time, the mechanics of an event's input and output are completely unlocked and i feel like the potential is unlimited with a minor amount of knowledge and code.
anyone newer to symphony, this is an absolute must read.
i presented one hurdle on twitter that seemed to have fizzled off in the time zone differences regarding POSTed
input type="file"
fields. i discovered that the relevant properties of this field aren't handled by$_POST
, but rather by$_FILES
. fair enough, i figured that in my event'sload()
i can simply copy the tactic used to preserve the$_POST
array:then, per brendo's directions, in
__trigger()
:now a
print_r($_FILES)
shows that the assignment was completed correctly. my theory is that somewhere along the lines, symphony is taking that data into its own hands and by the time__trigger()
is called,$_FILES
is irrelevant.i appreciate any direction, even if it's as modest as "check out this core class."