
07-13-09, 10:58 AM
|
|
Newbie Coder
|
|
Join Date: Jul 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is the code that i am using to loop through directory and get the images from it.
This is the code what i am using to send each file to the function.
PHP Code:
function group_media_upload($file_name, $groupalbum_id, &$space_left)
{
global $database, $url, $user;
// SET KEY VARIABLES
$file_maxsize = $this->groupowner_level_info['level_group_album_maxsize'];
$file_exts = explode(",", str_replace(" ", "", strtolower($this->groupowner_level_info['level_group_album_exts'])));
$file_types = explode(",", str_replace(" ", "", strtolower($this->groupowner_level_info['level_group_album_mimes'])));
$file_maxwidth = $this->groupowner_level_info['level_group_album_width'];
$file_maxheight = $this->groupowner_level_info['level_group_album_height'];
$new_media = new se_upload();
$new_media->new_upload($file_name, $file_maxsize, $file_exts, $file_types, $file_maxwidth, $file_maxheight);
..... .... ..... .....
The upload page for the users who are asked to upload files uses form post. just like any other upload form. But since i am trying to do that from the php server side i am looking for a way to correctly populate the $_FILES array with the data that i wanna send to the upload function of the CMS because that function uses $_FILES array inorder to process the uploaded files.
Can you help with this?
thanks
|