0

I am having trouble creating multiple uploads with valums ajax-upload whereby a user can select mutiple files at once instead of one at a time.

<div id="fileUpload">
    <input type="file" />
    <input type="file" />
</div>

Javascript

var ajaxup = new AjaxUpload('fileUpload', {
    action: 'index.php/s3/S3/uploadFile',
    autoSubmit: false,
    name: 'userfile',
    responseType: 'text/html',
    onSubmit: function(file , ext) {
        // send params
    }
    onComplete: function (file, response) {
        // display success message
    }

php output

print_r($_FILES);
Array
(
[userfile] => Array
    (
        [name] => filename.ext
        [type] => application/pdf
        [tmp_name] => path/to/temp.ext
        [error] => 0
        [size] => 616700
    )

)

I have been digging for a while but have had no luck. Has anyone every done this?

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
Ian Brindley
  • 2,197
  • 1
  • 19
  • 28

1 Answers1

0

AjaxUpload has been a dead, unmaintained library for over 2 years now. Look for the replacement in the file-upload repo.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82