Welcome Guest, Not a member yet? Register   Sign In
Using SWFUpload + Sessions + upload class, how I did it.
#3

[eluser]omed habib[/eluser]
Chris,

First off, this was an absolutely and positively amazing job. Thank you!!!

Second, it should be worth noting that:

1. The session library CANNOT be autoloaded in the config/autoload.php file for this to work (or anywhere else for that matter, CI will just ignore the second attempt)
2. In the controller Fileupload::upload() , you need to set the upload config parameters BEFORE you load the upload library...
3. ... and then when you do load the upload library, you need to pass those configs as an argument:

Code:
// Set upload path
$config['upload_path'] = '/uploads';
$config['allowed_types'] = 'jpg';
$config['max_size']    = '10240';

$this->load->library('upload', $config);

Other than that... I can attest that this method also works for the latest version of SWFUpload v.2.2.0 Beta 3 release. However, I ignored everything in the view file except for the post params:

Code:
post_params: {"PHPSESSID" : "<?=$this->session->userdata('session_id')?>"},

Thank you for your contribution!!


Messages In This Thread
Using SWFUpload + Sessions + upload class, how I did it. - by El Forum - 12-06-2008, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB