1
Mazar
how can i upload more then one image with the class uploader
  • 2009/7/23 20:00

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


here is my single upload it is working i got the snippet from XOOPS snippets in developer section

how can upload more then one image

$thumb $_POST['thumb'];
    include_once 
XOOPS_ROOT_PATH '/class/uploader.php';
    
$allowed_mimetypes = array('image/gif''image/jpeg''image/pjpeg''image/x-png''image/png');
    
$maxfilesize '200000';
    
$maxfilewidth '500';
    
$maxfileheight '500';
    
$uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH "/modules/news/uploads"$allowed_mimetypes$maxfilesize,         $maxfilewidth$maxfileheight);
    if (
$uploader->fetchMedia($_POST["xoops_upload_file"][0])) {
    if (!
$uploader->upload()) {
        echo 
$uploader->getErrors(); 
    } else {
        echo 
'

File uploaded successfully!

'
;
        echo 
'Saved as: ' $uploader->getSavedFileName() . '';
        echo 
'Full path: ' $uploader->getSavedDestination();
    }
    } else {
    echo 
$uploader->getErrors(); 
    }

with this code
please help

2
Mazar
Re: how can i upload more then one image with the class uploader
  • 2009/7/24 9:49

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


anyone here to help me with the above code to upload more then one picture

3
bumciach
Re: how can i upload more then one image with the class uploader
  • 2009/7/24 11:22

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


You can't. Class uploader uses only http protocol which can send one file at once.
The only workaround is to use Ajax or Flash technology.
There are some nice library (have not tried to integrate with XOOPS yet):
http://www.uploadify.com/download/
http://www.fyneworks.com/jquery/multiple-file-upload/

Login

Who's Online

395 user(s) are online (300 user(s) are browsing Support Forums)


Members: 0


Guests: 395


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits